Results 1 to 2 of 2

Thread: Keys pressed

  1. #1

    Thread Starter
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    Does anyone know a way my VB program can monitor ALL keypresses the system receives - whatever program has the focus - and is it possible to get the ASCII (or something equivalent) for the key that was pressed.
    Don't worry - I'm not writing a virus - it's actually a joke to play on someone.. if I get the program running I'll post it on here for all to enjoy.

    Is there an API call or something I can check periodically to get the key pressed etc?

    Cheers for any help.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



  2. #2
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Post

    Well, I've never used it, but you could try the GetAsyncKeyState API function to check for certain keys being pressed. For more info:

    http://www.vbapi.com/ref/g/getasynckeystate.html

    Hope that helps.

    ~seaweed

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