Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order sequence between form close and control valid
Message
From
04/11/2003 23:41:38
 
 
To
04/11/2003 22:41:43
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00846313
Message ID:
00846325
Views:
20
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform