Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing _SCREEN.Forms()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00197190
Message ID:
00197192
Views:
13
The problem is that each time you release a form, the formcount is reduced by 1 so you end up going past the number of existing forms. Try this:
DO WHILE _SCREEN.FormCount>0
  _SCREEN.Forms(1).Release()
ENDDO
>I am trying to programmatically release all system forms in an appliation. I thought the following code would do the trick:
>
>FOR x = 1 TO _SCREEN.FormCount
> _SCREEN.Forms(x).Release()
>ENDFOR
>
>Whenever I run this code, I encounter error 1924, "FORMS is not an object". Can anyone tell me what I'm doing wrong?
>
>James
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform