Results 1 to 2 of 2

Thread: Keyboard listener when outside of application....

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    68

    Keyboard listener when outside of application....

    Hello everyone.

    OK - I have a tricky one.

    I need to have some kind of keyboard listener that will listen for certain SINGLE keypresses in Windows, regardless of whether the compiled application is in focus, minimized, etc.

    For example, with the compiled application running, say someone switches to Word or Excel and starts working. If a certain key (say, F4) is pressed, I need my application to trigger something. Maybe opening a hidden form, or playing a trigger sound, etc.

    What I need help understanding is how to get the listener to remain active OUTSIDE of the complied application.

    I did a ton of Googling and found a reference to Keyboard Hooks. I found a lot of material that discusses small compartments of information about Hooks, VB methods that don't use hooks, Windows API references, etc., but nothing that I can process to form some kind of sample code or example to try out. There is nothing cohesive enough to get me started.

    Can anyone help me here? I just need some chunk of code to start me down the right path with this. Any explanation would be hugely appreciated! THANK YOU IN ADVANCE!

    -Dave

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: Keyboard listener when outside of application....

    I have created a simple SystemWideHotkey class for my own use

    It is attached with a sample code
    Attached Files Attached Files



Tags for this Thread

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