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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Windows F10

Status
Not open for further replies.

skorda

Programmer
Mar 3, 2004
13
US
Does anyone know how to disable the F10 key in Windows? It activates the menu when pressed (even when I hide it) and I can't assign anything else to it even in the keypress of a form. Thanks.
 
Skorda,

This will do it:

ON KEY LABEL F10 note

But are you sure you want to do this? F10 has a standard behaviour in all Windows apps. Why would you want it to behave differently in yours?

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
thread184-255208

Pressing F10 is similar to depressing the Alt key which triggers Windows menu.

1) You can issue an ON KEY LABEL F10 command to redefine its behavior.

2) If you have a MODAL form, you can hide the menu with SET SYSMENU OFF. If the menu is not visible, the KEYPRESS event will fire on F10.
 
Thanks to both of you... Yes Mike, I want to do this because there are certain forms in which the user cannot have access to the menu. Also, F10 is a key that the users really, really use (back from the DOS days) - I argued against it, but they are so used to using it that it would interfere with their productivity if I changed it. Besides, the user is always right, or so they say! Thanks again.

Soooo, I guess my next question is. How do you disable the ALT key from triggering the menu? (dbMark?)
 
Short of breaking it off of the keyboard, I don't think you can. VFP can't intercept it - Windows gets first crack at it. Of course if you have the resources, you could always write a replacement keyboard driver that eats the Alt key, but then you'd really be "violating" Windows standards.

Rick
 
Soooo, I guess my next question is. How do you disable the ALT key from triggering the menu?

I think the thing to do in this case is to disable the menu, or at least some of the options. You can always re-enable them when the user needs them.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top