Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order sequence between form close and control valid
Message
 
À
04/11/2003 23:41:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00846313
Message ID:
00846326
Vues:
20
Hi Erin,

The form.QueryUnload event executes as soon as you attempt to close the form; before the valid event of any control on the form and before the form closing. So if you insert thisform.lIsExiting = .T. in the form.QueryUnload it would work.

HTH

>Hi Michael,
>
>I had a similar problem recently and I found that if you are closing the form using the "X", there is no way to prevent the valid code from running in the last object that had the focus. However, if you are releasing the form by clicking on a command button that is located on the form you can prevent the valid code from running by creating a form property, such as lIsExiting, and setting it to .T. in the gotfocus event of the command button. Then place validation code in the valid event of the object that prevents the code from running if thisform.lIsExiting = .T.
>
>Unfortunately, I couldn't find a way to access the gotfocus event of the "X" button so I had to set the form's closable property to .F. and remove the user's ability to close the form with the "X". It's not the best solution, but it worked.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform