Visual Basic Online Course - Function Keys (F1 to F12)

Visual Basic Online Course

Function Keys


In VB6 ,in order to use the F-Keys (Function Keys) from your Keyboard or even any key, you need to set the form property [Key Preview] value to True .
Open new form [Form1]
Right-click on [Form1], View Code
The event [Form1_KeyDown]

Create Sub (I.E.: MyKey)

Go to [Form_KeyDown(KeyCode As Integer, Shift As Integer)], and write these lines:

Try out your application [Run your project] and after the form loads, press F5.


Thanx for reading

VB6 Popular Posts

Visual Basic Online Course - Run-time error '3021' : Either BOF or EOF is True, or the current record has been deleted.

VB 0.6 TreeView Control lesson Part1

VB 0.6 TreeView Control Lesson Part2