Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Routine to cycle and close all open forms?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01412529
Message ID:
01412532
Vues:
84
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform