Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form won't release
Message
 
 
À
20/04/1999 15:27:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00210262
Message ID:
00210378
Vues:
30
Sylvain,

I suspect it might be a timing issue and the WITH. It is basically holding a reference to the form. You might try fully qualified references instead:
if ( _screen.ActiveForm.QueryUnload() )
   _screen.ActiveForm.Release()
else
If that doesn't work maybe try _screen.Forms[] collection instead.

>Could someone please explain why this code work inside VFP and not from a EXE?
>
>This code is from the File|Exit menu to close all open forms before quitting the application. For a reason I can't catch, it will loop indefinitly, refusing to release the form. There's no message and the Release() method is called (I placed a WAIT WINDOW inside the IF to check it).
>
>I'm using VFP 5.0
>
>
llExitOK = .T.
>
>DO WHILE llExitOK AND (Type("_Screen.ActiveForm") = "O")
>	WITH _Screen.ActiveForm
>		IF .QueryUnload()
>			.Release()
>		ELSE
>			llExitOK = .F.
>		ENDIF
>	ENDWITH
>ENDDO
>
>TIA
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