Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching F9 and F10 keys in modal form
Message
From
11/03/2017 01:25:06
 
 
To
10/03/2017 18:26:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01648923
Message ID:
01648926
Views:
44
Hi!

>in form keypress
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>if nkeycode=-8   or nkeycode=-9 
>messagebox(trans(nkeycode))
>endi
>
>
>f9 pressed alone...-8
>f10 pressed alone.....-9
>see inkey() function in help.

In question I have placed messagebox() directly to keypress event handler and described that this event does not fire. If fires for other keys but not for F10 and F9. There is system menu defined which contains F9 and F10 shotcut keys. It is disabled for modal form but maybe it still catches F9 key.
F10 activates disabled system menu. I placed
ON KEY LABEL f9 MESSAGEBOX('F9 pressed')
ON KEY LABEL f10 MESSAGEBOX('F10 pressed')
to Form Init method but message boxes still do not appear.

I also posted it in http://stackoverflow.com/questions/42728825/how-to-catch-f9-and-f10-key-presses-in-modal-form

I cannot make modal form top-level and turn screen off since application is MDI application and multiple forms needs to be opened.
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform