Computing.Net > Forums > Programming > How do I detect keystrokes?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How do I detect keystrokes?

Reply to Message Icon

Name: Doug52392
Date: July 23, 2007 at 11:28:07 Pacific
OS: Windows Vista home premiu
CPU/Ram: Pentium D/1gb ram
Product: Gateway GT5428
Comment:

Hello, I am writing a program with Microsoft Visual Basic 2005 that detects certain keystrokes (eg. Ctrl+F1), returns the value of the keystroke, and preforms a certain action based on that value. I can detect them fine when the form with the code is open, but I cant figure out how to get the program to work when another program has focus (and the form is minimized). How do I get the program to detect keystrokes when it is mimimized or does not have focus?



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: July 23, 2007 at 17:56:21 Pacific
Reply:

You use Direct Input to scan the keystrokes as they come in, or you hook the keyboard drivers to intercept any key presses before the Windows kernel reads them. I don't believe either of these can be done with VB.NET.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: How do I detect keystrokes?

How do I create a hotkey with bat www.computing.net/answers/programming/how-do-i-create-a-hotkey-with-bat/17742.html

HOW DO I DOWN LOAD THIS www.computing.net/answers/programming/how-do-i-down-load-this-/87.html

Newbie: How Do I Test My Visualbasi www.computing.net/answers/programming/newbie-how-do-i-test-my-visualbasi/9034.html