Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catching F9 and F10 keys in modal form
Message
De
11/03/2017 01:25:06
 
 
À
10/03/2017 18:26:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Divers
Thread ID:
01648923
Message ID:
01648926
Vues:
43
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform