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!

Programmatically disable Windows keys

Status
Not open for further replies.

PahJoker

Programmer
Jun 5, 2006
3
US
I am using VFP9 and BINDEVENT to trap certain keyboard events in my app (like left SHIFT vs. right SHIFT being pressed), building off of this example:


What I need to do now is to temporarily disable the Windows key(s) while I run a certain task, then enable them again. The BINDEVENT method will notify me when a Windows key is pressed, but I don't know how to stop the Windows event from firing (i.e., I don't want the start menu to appear when it's pressed).

I have seen registry tweaks that will disable the Windows keys, but I assume these require a reboot (which is not an option).
 

I'm sorry I can't answer your question, but I am curious to know why you want to do this. Why would you want to prevent the user from opening the Start menu? And why particularly with the Windows key? Or do you also want to disable Ctrl+Esc and the use of the mouse?

Just wondering ...

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I have developed a task that measures reaction times as various stimuli are displayed on the screen. The user presses either the left or right SHIFT button depending upon the stimulus. Given the proximity of the SHIFT key to the windows key, the results of the task could be tainted by an accidental press of the Windows key. My goal is to disable the key only during the task, then reenable it.
 
To clarify, WM_KEYDOWN works fine for notifying my app that the Windows key has been pressed. The problem is that the Start menu comes up even though my app has been notified...how do I do the equivalent of a NODEFAULT to keep the Start menu from popping up?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top