|
-
Dec 7th, 1999, 03:58 AM
#1
Thread Starter
Member
There a way to capture an F1 keystroke? It doesn't have an ascii code...
-
Dec 7th, 1999, 04:08 AM
#2
Junior Member
You have to use either KeyUp or KeyDown. And check for KeyCode = vbKeyF1
-
Dec 7th, 1999, 04:09 AM
#3
New Member
It doesn't have a "keypress" ascii value but it does have a "keycode" that can be captured in the "KeyDown" event(say of a test box). The keycode is 112 for F1 but you'll find more in the MSDN under "Keycode constants"
-
Dec 7th, 1999, 04:13 AM
#4
Member
Ok, to find any keycode goto your form_keydown event and type in Debug.Print KeyCode. This will type a number in the visual basic "Imediate Box". That number is the number of the key typed. Now just type in a statement like: If keycode = 112 then msgbox "You pressed F1". The keycode for F1 is 112.
-
Dec 7th, 1999, 04:45 AM
#5
Thread Starter
Member
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
|