Results 1 to 3 of 3

Thread: System-Wide Hotkeys

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    Hey, I'm trying to create a few system-wide hotkeys (20, actually), and am aware I need to use the following API Calls:

    GlobalAddAtom
    RegisterHotKey
    UnregisterHotKey
    GlobalDeleteAtom

    I just don't know how to use them. Dan Appleman's API book gives no help. Anyone know how to do this?

    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)

    welcome.to/X12Tech
    [email protected]


  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    There are already some hotkey examples in the Topic Areas of VB-World, but just to note to you there is another simpler way to create a hotkey, only that it may not be unique to your application (it may activate another application, that's why the hotkey method is somewhat better). Just use the GetAsyncKeyState API call to retrieve what keys are being pressed, and if that keypress(es) corresponds to your application, then have it activate.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    Actually, that's exactly what I need. I don't mind if it activates another app, I just need my application to be able to proces it. I'm adding keyboard support to a program with none, and needed to be able to process key events while the focus was on the other program. Thanx!

    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: [email protected]
    ICQ#: 9872708

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