Hi Carel,
Thanks for your post!
I'd like to know how you added these control to your form, and also which
method did you use to show your form, Show or ShowDialog ?
If you use Show method to display your form, the form will enumerat all
controls/components in it and call the Dispose(true) method. You may verify
this by
setting a breakpoint in the dispose method of your control.
If you use ShowDialog method, then things are a little different, because
We often write code as
If (form1.ShowDialog == DialogResult.True)
{
mytext = form1.textBox1.Text;
}
....
So the controls could not be disposed after the form closed. You need call
the Dispose method on the form explicitly to dispose the form and the
controls.
Does it helpful to your problem?
If you still have problem on it, please let me know more about your
problem,
give me some sode snippets or a repro sample to let me look into it, thanks!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.