|
-
Mar 21st, 2002, 11:01 PM
#1
Thread Starter
New Member
OS-Wide Keyboard event?
Hey there. 
You know how there is an event like Form_KeyPress (or any abject for that matter)? Well I was wondering if there was some sort of API call or other thing where when a key is pressed an event is triggered even if the form doesn't have focus. (I know that there are keyboard check API functions but in order to detect a key press a timer would be needed) Or maybe there is an ActiveX control? If so it would be great if you could provide a download link to that.
Well I guess that's all. Please reply. Thanks.
-
Mar 22nd, 2002, 04:06 AM
#2
Frenzied Member
If you are looking for a system wide response to a specific key, you can use the MCL Hotkey OCX (with code also on the same site) which triggeres a Hotkey_Pressed() event when the key combination specified in it's settings is pressed.
On the other hand, if you want to trap every keypress system wide (for a key logger type thing) you need to install a WH_KEYBOARD_LL hook. This is only available in NT, Win2000 or WinXP though.
HTH,
Duncan
-
Mar 23rd, 2002, 12:44 AM
#3
Addicted Member
no, you would not need a timer to check for key events... Just use a While Loop... but make sure to put DoEvents int your while loop somwhere so windows will continue to function and not freeze up.... timers suck... very unaccurate.
To protect time is to protect everything...
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
|