Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controls collection
Message
 
 
To
04/07/2002 18:32:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00675459
Message ID:
00675501
Views:
13
Craig,

Why are you removing the controls by hand in the first place? VFP is going to automatically do this for you. When a container is released all of it's contained objects will be released.

>Hi everyone, I am trying to nail down a problem and I noticed this:
>if I use the following code in the exit method of my form
>
FOR EACH loControl IN ThisForm.Controls
>    ThisForm.RemoveObject(loControl.Name)
>NEXT
>The code is exiting the loop halfway through (there are 18 controls)
>
>can anyone explain why this would occur? I would have thought a FOR..EACH loop would check every item
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform