Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing Form when Adding a Custom Object
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00128281
Message ID:
00128514
Views:
15
Bro. Lafleur,

>If I use the 'X' in the corner, the form will not close without 'CANCEL' from the command prompt. Clicking the 'X' does not cause the unload to fire. Neither does it fire the 'release'.

What it _does_ fire is the QueryUnload event. My code generally looks something like this:
Form.QueryUnload

IF &&we can unload the form now
    RETURN .T.
ELSE
    NODEFAULT
    RETURN .F.
ENDif

Form.cmdQuit.Click

IF ThisForm.QueryUnload()
    ThisForm.Release()
ENDif
In this case, you'd probably want to put the code releasing the object in either the QueryUnload or (better) a custom method called from QueryUnload.

S&F,
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform