Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close a form programatically
Message
De
20/07/2009 13:50:43
 
 
À
20/07/2009 08:29:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01413271
Message ID:
01413412
Vues:
55
shouldn't you be using a decrement count rather than increment count in this case?

for lnCounter = _screen.FormCount to 1 step -1
loform = _scren.Forms(lnCounter)
endfor

>Christof --
>
>Actually, I have found that even this structure can cause C5 errors. Properties Events & Methods Editor uses the following code instead
>
>For lnCounter = 1 to _screen.FormCount
>loForm = _screen.Forms(lnCounter)
>EndFor
>I first encountered this within Properties Events & Methods Editor, and found that it was an error that could be replicated over and over; furthermore, I was also informed by one of the beta-testers that he had previously come to that exact same conclusion based on his experience under completely different circumstances.
>
>>Hi,
>>
>>
>>for each loForm in _screen.Forms
>>
>>
>>Please add the FOXOBJECT clause to the FOR EACH loop. For each without that clause will cause C5 errors in the long run as VFP fails to release COM references to VFP objects properly.
>Jim Nelson
>Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform