Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I use the F10 key !!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00174739
Message ID:
00174744
Vues:
27
>Hi everybody !
>
>I have a little problem with the F10 key... I would like the keyPress event to be called when I hit F10 as if I hit the F2 key.. For the moment, the F10 key only gives the focus to the menu and the KeyPress event is never called ! Is Windows 95 the only one can use the F10 key ???
>
>Any ideas ???
>
>Thanks in advance...and sorry for my poor english !
>
>Benoit Grenier.

To invoke a keypress event via Function key, you would have to assign with

ON KEY LABEL F10 thisform.myobject.keypress( nWhatKey, nAnyShiftAltCtrl )

The object reference will need to be specific to the object unless you had a generic property on your form that was a pointer to the desired object to force a keypress.

Ex: with a new property ObjectF10
Thisform.ObjectF10 = Thisform.myObject

or if within a pageframe

Thisform.ObjectF10 = Thisform.myPageFrame1.Page1.myObject


Then you could have the ON KEY LABEL =

ON KEY LABEL F10 Thisform.ObjectF10.KeyPress( ..., ... ) && with whatever parameters would be required...

Hope this helps, but use caution in case F10 is used for any other forms that may not have this custom property. You may want to check with PUSH KEY CLEAR, POP KEY commands to keep proper control...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform