Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keypress event does not work for function keys

Status
Not open for further replies.

Devin

Programmer
Dec 17, 2001
42
US
Can anyone tell me how to use keypress, or some equivalent event, to watch function keys? Yes, the form's keypreview property is true. It works fine for other keys, and help doesn't say that F-keys should work any differently, so I'm very confused. My guess is that F-keys have some kind of special status with the OS. Could it be because my debugger is intercepting the F-keys? I haven't yet tried running from the EXE, instead of via the debugger. By the way, I know about the constants, VBKeyF1, etc..

Thanks much for any help.

Devin
 
Try using the KeyDown event. Unlike KeyPress, KeyDown will trap the function keys and navigation keys
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top