Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form.release question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00228761
Message ID:
00228885
Views:
15
>>>>We have an application which runs a form. On the form there is an "EXIT" button. The exit button calls thisform.release, and thisform.release clears events.
>>>>
>>>>When someone clicks the "X" button from the control box in the upper right corner of the form the thisform.release does not get called. The form disappears and the application can't close at that point. Where else do I need to issue a clear events? or what is a solution to this problem.
>>>
>>>You want the Queryunload event, that's what's fired when you close a form from the title bar...
>>
>>I think with this method you need the code CLEAR EVENTS in both the QueryUnload and Release procedures.
>>
>>If you want the code to execute everytime the form is closed, you can stick it in the Destroy procedure of the form.
>
>I don't like using Destroy - it's too late to stop things at that point...

Okay...that is a personal thing...but in this case, if I were arguing, I would contend that if we are issuing a CLEAR EVENTS, we know that we are done with this form...but I am not arguing...

I am not saying that code in the QueryUnload procedure might not be needed, just that the CLEAR EVENTS could go in the Destroy procedure.

Anyways, just a matter of taste.

Take care,
Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform