Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form.Closable
Message
From
04/08/1999 19:11:29
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00249986
Message ID:
00249987
Views:
17
>Can you run code when the user clicks on the Close button (the X) when Form.Closable = .t. I want the close button to function like my Cancel button, which runs some exit code and releases the form. Can this be done with the close button, or do I have to settle for setting Form.Closable = .f. and rely solely on my Cancel button?

You can put code in the forms QueryUnload method. That way, you can check if there is any condition that should prevent the closing of the form and stop it with a NODEFAULT. If you don't have any reason to stop the close, you can put the code in the forms Destroy method.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform