-
Feb 16th, 2007, 06:56 AM
#1
Thread Starter
Junior Member
[RESOLVED] keypress for function keys??? help??
ei guys,
i need ur help... what are the keypress (vb ascii code) for function keys?? tnx
-
Feb 16th, 2007, 07:04 AM
#2
Re: keypress for function keys??? help??
vbKeyF1 through vbKeyF12
VB 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
-
Feb 16th, 2007, 07:05 AM
#3
Re: keypress for function keys??? help??
There are no (Ascii codes) for the Function keys. Do a search on detecting Function Key presses - there are a few examples posted here
-
Feb 16th, 2007, 07:05 AM
#4
Thread Starter
Junior Member
Re: keypress for function keys??? help??
this is for vb6 ryt? tnx so much...
-
Feb 16th, 2007, 07:06 AM
#5
Re: keypress for function keys??? help??
There you go, KeyCode constants for Function Keys.........
-
Feb 16th, 2007, 07:07 AM
#6
Re: keypress for function keys??? help??
ryt?
-
Feb 16th, 2007, 07:08 AM
#7
Thread Starter
Junior Member
Re: keypress for function keys??? help??
VB Code:
ei hack, i mean d keys that u gave, i was asking if its for vb6? thanks so much [/CODE]
-
Feb 16th, 2007, 07:11 AM
#8
Re: keypress for function keys??? help??
It is vb6, but not ASCII.
-
Feb 16th, 2007, 07:14 AM
#9
Re: keypress for function keys??? help??
Originally Posted by bang_01
VB Code:
ei hack, i mean d keys that u gave, i was asking if its for vb6? thanks so much [/CODE]
This is the Classic VB forum section, so any code examples I post here is for VB6.
-
Mar 3rd, 2021, 11:17 PM
#10
Registered User
Re: keypress for function keys??? help??
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
-
Mar 4th, 2021, 07:34 AM
#11
Lively Member
Re: [RESOLVED] keypress for function keys??? help??
Code:
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|