Results 1 to 6 of 6

Thread: Creating System Wide Hook

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    7

    Question

    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?

  2. #2
    Junior Member
    Join Date
    Feb 2001
    Location
    Singapore
    Posts
    24
    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©

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    7
    ok well I took your advice and got me a dll off a program at PSC that might work. thx

  4. #4
    Junior Member
    Join Date
    Feb 2001
    Location
    Singapore
    Posts
    24
    If you find a working dll, do you mind sending it to me© Thanks

  5. #5
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    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 ]
    Last edited by Lord Orwell; Feb 19th, 2001 at 05:22 AM.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  6. #6
    Junior Member
    Join Date
    Feb 2001
    Location
    Singapore
    Posts
    24
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width