ei guys,
i need ur help... what are the keypress (vb ascii code) for function keys?? tnx
Printable View
ei guys,
i need ur help... what are the keypress (vb ascii code) for function keys?? tnx
vbKeyF1 through vbKeyF12VB Code:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) 'Set the Form's KeyPreview property to True Select Case KeyCode Case Is = vbKeyF1 MsgBox "You pressed F1" Case Is = vbKeyF2 MsgBox "You pressed F2" Case Is = vbKeyF3 MsgBox "You pressed F3" Case Is = vbKeyF4 MsgBox "You pressed F4" Case Is = vbKeyF5 MsgBox "You pressed F5" Case Is = vbKeyF6 MsgBox "You pressed F6" Case Is = vbKeyF7 MsgBox "You pressed F7" Case Is = vbKeyF8 MsgBox "You pressed F8" Case Is = vbKeyF9 MsgBox "You pressed F9" Case Is = vbKeyF10 MsgBox "You pressed F10" Case Is = vbKeyF11 MsgBox "You pressed F11" Case Is = vbKeyF12 MsgBox "You pressed F12" End Select End Sub
There are no (Ascii codes) for the Function keys. Do a search on detecting Function Key presses - there are a few examples posted here ;)
this is for vb6 ryt? tnx so much... :)
There you go, KeyCode constants for Function Keys.........
ryt? :confused:
VB Code:
ei hack, i mean d keys that u gave, i was asking if its for vb6? thanks so much [/CODE]
It is vb6, but not ASCII.
This is the Classic VB forum section, so any code examples I post here is for VB6. :)Quote:
Originally Posted by bang_01
Good morning...
I need help.. :(
I tried my codes but nothing happen when i press "F8"
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case Is = vbKeyF8
'Text2.Text = Text1.Text + 1
MsgBox "it is F8"
End Select
End Sub
Code:Private Sub Form_Load()
Me.KeyPreview = True
End Sub