Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing Form when Adding a Custom Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00128281
Message ID:
00128514
Vues:
17
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform