Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order sequence between form close and control valid
Message
De
04/11/2003 23:52:06
 
 
À
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:
00846327
Vues:
30
>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.

Instead of Valid() event, I could put the code in a method and call that method when the keypress of the control textbox is a carriage return.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform