Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use F1 to F10 as hot-key in my program?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00187035
Message ID:
00187049
Vues:
24
>Dear all,
>
> For example, I have an exit button in my form, I set its caption = (Alt-\< X) so that the user can use Alt + X to exit. I want the user to use F10 to access my exit button, what should I do? I know the ON KEY code of F10 is 324 but how can I use it to access the exit button?
>
>thanks
>Power

Note: F10 has a standard meaning in the Windows interface. It means 'activate the first pad of the system menu'. Try hitting F10 in Word or Excel (or the VFP development environment) and you'll see this happen.

ON KEY LABEL can override this, because it's a leftover from DOS programming. ON KEY LABEL definitions supercede any other key definitions (except menu shortcuts(?) and ON ESCAPE setting). But it's pretty bad practice to redefine Windows standard key combinations like this. Just like you wouldn't change Ctrl-X to mean something other than 'Cut', or Alt-F4 to mean other than 'Exit program', because experienced Windows users will expect standard behavior and be angry that it's changed.

If your users specifically request this behavior, you should (IMHO) try to talk them out of it because it violates the standard Windows interface. If they absolutely insist on it, give them what they want, but it's their problem that they chose a non-standard interface.

My US$.02,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform