Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

All keyboard keys except one locked out ???

Status
Not open for further replies.

BobbaFet

Programmer
Feb 25, 2001
903
NL
Just like the subject, I want to lock out certain keyboard
keys so that windows cannot receive them, nor any other app.
But I dont want the entire keyboard locked out. Just a
couple of keys (in fact only F12 should be unlocked). How
can I do this?

thanx allot,

BobbaFet BobbaFet

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com

&quot;<beer brand> is like making love in a cano...
it's <f-word + ing> close to water !!!&quot;
- Monty Python's Flying Circus, 1969/70
 
You can 'lock' it from your app (when your app is the active window) by using OnkeyDown then

if key = vk_f12 then
//Call my method.

When a key is pressed, Windows generates a WM_KEYUP or WM_KEYDOWN message. I'm not sure how you can stop these being generated. If it's possible, I'd be interested to find out.

lou
 
thanx for your reply lou,

Ill try figuring out how to intercept those messages.
If I get anything to work ill post it here!

Greetz, BobbaFet

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top