Capturing KeyStrokes

How can I capture a users keystrokes at all times even so it doesn't matter what control has focus?

So no matter where they are on a form and they push F5 I can be waiting for that keystroke.

Thanks for any help!
jrcpAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mcriderConnect With a Mentor Commented:
Set the form's KeyPreview property to true, then the form's keydown/keyup/keypress events will fire no matter what control has focus...


Cheers!
0
 
bharatnCommented:
You can use Keypress,keydown,keyup for events like textbox,commandbutton etc. for Focus on the forms you have to set the keypreview property of the form to true and it'll trigger !!!

try it out
bharat
0
 
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
All Courses

From novice to tech pro — start learning today.