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:
01412542
Vues:
74
This message has been marked as a message which has helped to the initial question of the thread.
Even More:
FOR lnForm = _screen.FormCount TO 1 STEP -1
    IF TYPE("_screen.Forms(lnForm).Name") == "C" AND _screen.Forms(lnForm).Baseclass == "Form"
          _screen.Forms(lnForm).Release()
    ENDIF 
ENDFOR
>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
>>
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform