Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Routine to cycle and close all open forms?
Message
 
 
To
15/07/2009 13:37:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01412529
Message ID:
01412532
Views:
85
This message has been marked as a message which has helped to the initial question of the thread.
You can start from the bottom of the list and simplify code
FOR lnForm = _screen.FormCount TO 1 STEP -1
    IF TYPE("_screen.Forms(lnForm).Name") == "C"
       IF _screen.Forms(lnForm).Baseclass == "Form"
          _screen.Forms(lnForm).Release()
       ENDIF
    ENDIF 
ENDFOR
>>Kirk
>
>
>lnFormToClose = 1
>FOR lnForm = 1 TO _screen.FormCount
>    IF TYPE("_screen.Forms(lnFormToClose).Name") == "C"
>       IF _screen.Forms(lnFormToClose).Baseclass == "Form"
>          _screen.Forms(lnFormToClose).Release()
>       ELSE
>          lnFormToClose = lnFormToClose + 1
>       ENDIF
>    ENDIF 
>NEXT
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform