Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with _screen.formcount and toolbars.
Message
From
22/06/1999 05:51:20
 
 
To
22/06/1999 04:56:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00232368
Message ID:
00232372
Views:
14
Hei Mårten

You should be able to do it this way:
FOR i = _SCREEN.FormCount TO 1 STEP -1
   _SCREEN.Forms(i).Release()
ENDFOR
I think I've seen somewhere that the toolbar always will be first in _screen.Forms. If this is not the case, you could test for this and release it last.

Arne


>I have just upgraded from VFP3 to VFP6 and are now doing some changes in my program to make it work in VFP6. And the problem I have is when i'm closeing down my application and I run the following code:
>
>nFormCount = _screen.formcount
>
>for i = 1 to nFormCount
> _screen.activeform.release()
>endfor
>
>in VFP3 it worke'd just fine, but now it seem like _screen.formcount counts my toolbar as a form to and then the _screen.activeform.release() gives the following errormessage "ACTIVEFORM is not an object". How can I get around this? (The toolbar has to be closed last becouse otherwise my forms will complain).
>
>Thanks in prior!
>
>/Mårten Törnquist (marten@megasol.se)
Previous
Reply
Map
View

Click here to load this message in the networking platform