Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Screen.Forms(i) dont work?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00450381
Message ID:
00450383
Views:
27
>Hi
>Im trying to remove objects from the screen and the code below dont work, i cant understad why im getting the message 'controls is not an object'...
>
>FOR i = 1 TO _SCREEN.CONTROLCOUNT
> _SCREEN.REMOVEOBJECT(_SCREEN.CONTROLS(i).NAME)
>ENDFOR
>
>May i have to do one by one the removeobject() separately?
>
>TIA

Do it in the reverse order. I is assigned the range upfront. After you have removed half the controls, i goes beyond the current ControlCount value so you get the error.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform