How in the world do you make a Hook that will intercept pressed keys system wide to run a few commands before they are sent to the active application?
Printable View
How in the world do you make a Hook that will intercept pressed keys system wide to run a few commands before they are sent to the active application?
You require a Dll thats written in C to make the hook procedure accessible to all threads, which mean placing the hook procedure in a DLL© I'm also looking for a DLL that i can use cause i dont know C©
ok well I took your advice and got me a dll off a program at PSC that might work. thx
If you find a working dll, do you mind sending it to me© Thanks
visit http://forums.vb-world.net/showthrea...threadid=55173 It contains complete code in visual basic to capture keys.
If you are just interested in detecting something like ctrl-x or whatever, read up on the GetAsyncKeyState function. Despite the win32 documentation on it, it actually works globally, not just while your app has focus. [edited to fix link :)]
Yes, it work gobally© If you need to constanly check for which key is pressed, do you use a timer or is there a more efficient and accurate way to do it