soriega
asked on
EventHandler that listens for a specific keystroke?
Hi
first of all: I use VB.net in Visual studio 2005
I am trying to make an eventhandler that waits (listen) for a specific keystroke which triggers a Sub() where some tasks are performed. How can that be done? For example i wan't to program a script that opens Internet explorer when i press "arrow down" key , opens Frontpage when i press "arrow up" opens excel when i press "arrow left" ?
How can that be done?
first of all: I use VB.net in Visual studio 2005
I am trying to make an eventhandler that waits (listen) for a specific keystroke which triggers a Sub() where some tasks are performed. How can that be done? For example i wan't to program a script that opens Internet explorer when i press "arrow down" key , opens Frontpage when i press "arrow up" opens excel when i press "arrow left" ?
How can that be done?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
For (1), you would need a keyboard hook:
https://www.experts-exchange.com/questions/21584180/Detect-a-Ctrl-F12-press-on-keyboard-with-no-focus-on-application-dll-required.html#15021651
https://www.experts-exchange.com/questions/21584180/Detect-a-Ctrl-F12-press-on-keyboard-with-no-focus-on-application-dll-required.html#15021651
(1) Only when your app has FOCUS.
(2) At ANY time, regardless of whether your app is in the foreground or not.