Hi guys,
How will VB6 know that the user presses F1,F2..F12 keys?
I could not find the Ascii values of these keys.
I need to work with them in Form_KeyPress event.
thank you guys.
Printable View
Hi guys,
How will VB6 know that the user presses F1,F2..F12 keys?
I could not find the Ascii values of these keys.
I need to work with them in Form_KeyPress event.
thank you guys.
They do not have Ascii codes.. you need to use the KeyDown/KeyUp events instead, eg:
Code:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF1 Then
MsgBox "F1"
End If
End Sub
Wow !!
Thank you very very much !!!!
You helped me !!!!
Quote:
Originally Posted by si_the_geek
Don't forget to set the Form's KeyPreview property to True.