Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Screen object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00392079
Message ID:
00392089
Vues:
12
Hi Michael,

>I'm trying to release all forms, other than the main form, when a button is clicked. They are not in a form set. The code works fine when the main form and one other form are open, but once I open more forms the code fails with a "FORMS is not an object error."
>
>For i=1 to _screen.formcount
> If _screen.forms(i).name<>"frmMain"
> _Screen.forms(i).release
> Endif
>Endfor

You've almost got it! Just reverse the loop:
For i=_screen.formcount to 1 step -1
   If _screen.forms(i).name<>"frmMain"
      _Screen.forms(i).release
   Endif
Endfor
Bill Armbrecht
VFP MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform