Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to release forms and fxp after APP is finished
Message
From
25/08/2010 12:37:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to release forms and fxp after APP is finished
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01478405
Message ID:
01478405
Views:
202
I need to know how to close the references to a form (and fxps) when the app is finished and the form is closed. The form is not modal, so the app finishes, but the form remains alive. That is fine. It is when the form is closed that I need to make it "go away".

The problem that I am running into is that VFP is holding onto a reference of forms and some fxps after the app has finished running. The only way I can figure out how to release the forms and fxps is to issue RELEASE ALL CLEAR ALL from the command line AFTER the app is finished. The main file in the APP is a PRG, which calls the form. The form is a normal form in the VFP window.

Here is the main program:
LPARAMETERS tcStartScreen
PUBLIC frmJobBuilder AS FORM

SET PROCEDURE TO MH_Procs ADDITIVE
SET PROCEDURE TO DateFunctions ADDITIVE

LOCAL lcSetClass
lcSetClass = SET("Classlib")
IF AT("REGISTRY", lcSetClass) = 0
	SET CLASSLIB TO Registry ADDITIVE
ENDIF
IF AT("TEMPLATES", lcSetClass) = 0
	SET CLASSLIB TO Templates ADDITIVE
ENDIF
IF AT("CUSTOM", lcSetClass) = 0
	SET CLASSLIB TO "CUSTOM" ALIAS "CUSTOM" ADDITIVE
ENDIF

DO FORM JobBuilder NAME frmJobBuilder WITH tcStartScreen NOSHOW

frmJobBuilder.SHOW()

RETURN
David
Next
Reply
Map
View

Click here to load this message in the networking platform