Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop DESTROY method and return to form?
Message
From
11/10/2001 06:24:30
 
 
To
10/10/2001 22:43:34
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00566762
Message ID:
00566839
Views:
11
There are typically two different ways in which a form is closed.

  1. Thisform.release

  2. User clicks the title bar close x box



When the form release method fires it next executes the destroy method, and finally the unload method, whereas when the user clicks the close box, the QueryUnload method executes and if it returns True the destroy method, then unload method fire.

What you can do is in your Release method place a line like:
if not This.QueryUnload
    Return .f.
endif
And in the QueryUnload event place code to control whether the form closes or not.

Glenn
>When a user closes a form, DESTROY appears to be the first method fired that I can tell. If I put error checking in there, how can I, with a messagebox, send the user back to the form if they want to fix an error and NOT finish releasing the form? I have been guessing at some possibilities but they all seem to continue on and close the form.
Previous
Reply
Map
View

Click here to load this message in the networking platform