Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This can't be impossible to do
Message
De
31/03/2002 07:05:38
 
 
À
30/03/2002 15:01:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00639169
Message ID:
00639260
Vues:
23
>I tried your code and it too only works if all forms are modeless. If a modal form is on screen it does not release.
> I added code to check forms collection after releaseallforms() and it
>shows that all forms are not released when the active form is modal.
> Yours does not hang due to iterating through the forms collection
>for i = 1 to _screen.formcount step -1, but it does not shutdown either
>unless user interactively closes the modal form. I am looking for a way
>to programatically close a modal screen when a user leaves for the day with a modal screen displayed.
>
>
>
>procedure	TerminateApplication()
>	=ReleaseAllForms()
>	clear events
>	on shutdown
>        quit
>return
>
>procedure	ReleaseAllForms()	
>	local i, obj
>
>	for i = _Screen.FormCount to 1 step -1
>		obj = _screen.Forms[i]
>		if( type('obj') == "O" )	&& may have disappeared
>			if( pemstatus(Obj, 'Release',5) )
>				=Obj.Release()
>				obj = .null.
>				release obj
>			endif
>		endif
>	endfor
>		=strtofile("Forms collection "+chr(13)+chr(10) ,"shutdowntrace.txt",.t.)
>		for m.xx = 1 to _screen.formcount
>			=strtofile("_screen.forms("+alltrim(str(m.xx))+") = "+_Screen.forms(m.xx).name+chr(13)+chr(10) ,"shutdowntrace.txt",.t.)
>		next
>		=strtofile("End of Forms collection "+chr(13)+chr(10)+chr(13)+chr(10) ,"shutdowntrace.txt",.t.)
>
>endproc
>*---------------------------------------------------------------------------
>
>I have a test program with modeless, modal, browse and message boxes to test this.
>If you would like to take a stab at it, let me know and I can send it to you. I appreciate any help.
>
>Elmer

OK, mail the test program and I'll have a go at it
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform