Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop DESTROY method and return to form?
Message
De
11/10/2001 06:24:30
 
 
À
10/10/2001 22:43:34
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00566762
Message ID:
00566839
Vues:
12
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform