Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
QueryUnload or Release?
Message
De
25/11/2003 08:17:31
 
 
À
24/11/2003 20:16:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00853142
Message ID:
00853229
Vues:
16
Tracy, try this:
Form::Release
If this.queryunload()
  release this
endif
I have used this technique since the Fox was a pup.

Glenn


>I have always used thisform.release in my command buttons that close a form so that I can access form properties if I need to before releasing all of the form's objects. However, I would like to allow the user to click on the 'X'in the top right hand corner of the form to also close the form and do some checks to determine if the form should be closed or not. Typically, this would be the same as pressing escape so I am prompting the user to exit the form or not and return to the form if necessary to continue editing so the user can save his changes. In testing, I noticed that clicking on the x does NOT run the form's release method, but queryunload. Hence, code that I had in the form's release method will have to be moved to queryunload. Yet calling queryunload from a command button does not seem to close the form. What is the best way to handle this? I don't want to put duplicate code in both queryunload and release...
>
>TIA!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform