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:
00450385
Views:
22
Ariel,

You need to iterate backwards (FOR i = _SCREEN.CONTROLCOUNT to 1 STEP -1) since ControlCount changes as you remove objects.

>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
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform