Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling a Key Press
Message
 
À
14/12/1999 11:24:02
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00303395
Message ID:
00303526
Vues:
14
>re: disable the "-" key
>
>On key label - Do Nothing
>
>Procedure Nothing
>Return && Nothing

Michael,

First ON KEY LABEL - * will do this without a dummy function delcaration.

Second, this is not a good way to handle this situation. ON KEY is an intercommand interrupt which is global in scoipe, that is it will prevent the key from being processed anywhere.

Third, good encapsulation dictates that the textbox should handle the key strokes internally, using the KeyPress event is exactly what the KeyPress is for.

Also, as an intercommand interrupt, OKL's can have severe and devastating side effects. The OKL routine will interrupt running code and can cause all kinds of side effect problems. It is much better to handle things in a KeyPress evetn where the event doesn't fire unless the context is right for a key to be pressed. Of course teh exception to this rule is when you need and intercommand interrupt.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform