Link to home
Start Free TrialLog in
Avatar of musthang
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.
Avatar of AlexFM
AlexFM

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).
Avatar of musthang

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.
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
And this is the same code with sample application:

http://vbwork.4mg.com/articles/disablelowlevelkeys.html
ASKER CERTIFIED SOLUTION
Avatar of srimanth
srimanth

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial