|
-
Sep 7th, 2011, 08:35 AM
#1
Thread Starter
Addicted Member
KeyBoard Hook - Issue, Hooks while form not being used
I Have a keyboard hook in my application in some of the forms.
This hook is mainly being used to catch 2 keys:
Escape = Will prompt to close the form
F5 = Will pop up a inputbox for the user to send a direct command to the DB.
These hooks call functions already being used by buttons, but the hooks are there for comfort.
The problem comes in when the form is not active and one of these keys is used.
If the user hits the escape button on the keyboard while using another application like MS Word for example, then my application picks up that escape and runs the commands set for it.
Is there a way to restrict these hooks to only fire when the user is actually using the screen?
Tags for this Thread
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
|