W
WH
I put a few controls on a form at runtime like
Dim bt as Button
For n = to to 5
bt = new Button
...
Me.Controls.add(bt)
Next
How can I again delete them at runtime? I tried
For each bt in Me.controls
bt.dispose()
Next
But only a few controls disappear, some stay on the form.
bt = Nothing() does'nt do the job either
Is there a way to completely discard then from the form and from memory?
Thanks
WH
Dim bt as Button
For n = to to 5
bt = new Button
...
Me.Controls.add(bt)
Next
How can I again delete them at runtime? I tried
For each bt in Me.controls
bt.dispose()
Next
But only a few controls disappear, some stay on the form.
bt = Nothing() does'nt do the job either
Is there a way to completely discard then from the form and from memory?
Thanks
WH