>Hi All,
>
>I have a form in which I put code in the MouseDown event to trap if the Alt key is pressed. This native event accepts a parameter called nShift and contains a value of 4 if the Alt key is pressed.
>
>It works. The "problem" is that when the event is exited, VFP interprets the Alt key press as a trigger to activate the main menu and my first menu option is highlighted. How can I prevent this from happening?
Two wild guesses: one, issue a nodefault if you detect the Alt. Two (if this doesn't work), Deactivate menu _msysmenu and then activate again. Three (third one is free :) try to set focus to something on your form, or even to issue a Mouse() on it, just to have some activity on the form to deactivate the menu. Keyboard "{F10}" should have the same effect on the menu, so if it's activated it may be used to deactivate it.
One of these may work, well, maybe.