Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bypass Validation when a Cancel button is pressed.
Message
De
11/11/1999 16:27:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00288499
Message ID:
00290302
Vues:
39
>Remember me? Gosh this thread has gone a long way. Your suggestion worked great concerning checking for Lastkey() in the Valid method when the 'cancel' command button was pressed. Now, how can I stop the validations from executing when the user exits the form by pressing Close from the title bar menu (I've got the form set as closable) or clicking on the 'x' in the upper right hand corner of the form.
>
>Thanks,

I don't have a well formulated answer for you on this one... but maybe I can point you in the right direction. Start by creating a property on your form called something like letmeout. So you can change your if statement to: if lastkey() = 27 or thisform.letmeout = .t. then

Then find out which event fires first if someone clicks the X or hits close on the form. At that point, set thisform.letmeout = .t.

In the forms init method, set thisform.letmeout = .f.

Does that give you a good start?
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform