Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to keep cursor in field till data input is correct?
Message
De
15/02/2000 08:21:00
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00331251
Message ID:
00332111
Vues:
13
>Valid gets lastkey 27 (I see it in my wait window message) and loses focus. Then the Cancel button gets focus, but the release of the form is not executed. If I hit the Cancel button once more, then it releases. What am I doing wrong?

I don't know about wrong, but what about putting thisform.release in the valid clause. Put your form-closing code in the release event (if needed)

valid:
If lastkey=27
thisform.release
Else
**other code
Endif

the problem is likely caused by the change in focus, and that the cancel button must be focused before it can fire (which it can't do until the valid clause finishes)

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform