Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms not releasing?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00428033
Message ID:
00428298
Vues:
20
Steve,

An object can not destruct while it is on the callstack. The button calling thisform.Release() can't really release the form because the MED form is modal and once it starts running it's going to keep the button click in the callstack.

>Here is my command button code to switch from form to form:
>
>THISFORM.Release
>DO FORM \ARREST\FORMS\MED.SCX WITH ;
>	cForm, cIncident, cAddSW, cEditSW, cMainFrmSW, ;
>	cMedFrmSW, cShkFrmSW, cTimFrmSW, cAEDFrmSW, cOutFrmSW, cAdmFrmSW, cAdmSW
>
As a test to show it, create a modal form gomodal that has just a button with this code:

activate window "debug output"
debugout "going"
do form gomodal
debugout "back"

Note the forms will pop up on top of each other as you launch them so you'll have to move them to see them. If you add a thisform.Release() to the beginning of the method, you'll see that they don't really destruct until the last opened form is closed then they all disappear.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform