Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Screen.Forms(i) dont work?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00450381
Message ID:
00450394
Vues:
38
>Thanks Rick And Larry!!!
>
>From now since i know the problem, i decide to solve it hardcoding 'controls(1)'
>
>FOR i = 1 TO _SCREEN.CONTROLCOUNT
> _SCREEN.REMOVEOBJECT(_SCREEN.CONTROLS(i).NAME)
>ENDFOR

I think you mean
_SCREEN.REMOVEOBJECT(_SCREEN.CONTROLS(1).NAME)

IAC, you could also use the ControlCOunt property in the RemoveObject line. I saw this technique in a message by Ed Rauh last week:
With _Screen
   for i = 1 TO .ControlCount
      .RemoveObject(.Controls(.ControlCount).Name)
   endfor
Endwith
The range for i is pre-initialized but ControlCount continually changes during the process. This will always remove the last object in the collection.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform