musthang
asked on
KEYPRESS question!
is it possible intercept the keypress event also if i'm not on the form (for example during a videogame)? in other words, like a "shortkey". thanks.
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q177/9/92.ASP&NoWebContent=1
Replace WH_KEYBOARD with WH_KEYBOARD_LL in this semple, and you have global keyboard hook which handles all keyboard messages (Windows NT/2000 or later).
ASKER
sorry I couldn't make it work :(
can you please give me a code-example about this: when I press "a" i want that a msgbox comes up, anywhere I am in that exact moment.
can you please give me a code-example about this: when I press "a" i want that a msgbox comes up, anywhere I am in that exact moment.
Sorry, this sample requires a lot of work to change it from local to global hook. This article is better:
http://www.codeguru.com/vb_system/PK111802.html
http://www.codeguru.com/vb_system/PK111802.html
And this is the same code with sample application:
http://vbwork.4mg.com/articles/disablelowlevelkeys.html
http://vbwork.4mg.com/articles/disablelowlevelkeys.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.