Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close All Forms
Message
 
 
To
04/08/2005 22:17:08
John Tomblin
Service Station Systems, Inc.
San Jose, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01038798
Message ID:
01038799
Views:
16
Try
for Ctr = _Screen.FormCount TO 1 STEP -1
	_Screen.Forms(Ctr).Release()
endfor
>Before opening form X, I need to make sure that all other forms are closed including other instances of form X. Putting the following code in the load of the form doesn't work.
>
>for Ctr = 1 to _Screen.FormCount
> release windows (_Screen.Forms(Ctr).Name)
>endfor
>
>This doesn't gracefully close the forms. That is, it just removes the forms from memory leaving various objects, cursors, variables, etc. So I tried the following:
>
>for Ctr = 1 to _Screen.FormCount
> _Screen.Forms(Ctr).Name.release
> release windows (_Screen.Forms(Ctr).Name)
>endfor
>
>That produces a pile of errors.
>I also tried moving this code to a seperate procedure with a "do form ..." after it which produced similar results and problems.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform