+ 1
How to dispose the dynamically created panels in vb.net
I was created panels by for loop and then after i want to dispose all the created panels when click delete button.
2 Antworten
+ 1
First you have to store them in a list then simply remove them by clearing the list.
I hope that will work
+ 1
Write this code in the delete button event handler
For Each ctl As Control ln Me. Controls
If TypeOf ctl Is Panel Then
Me. Controls. Remove(ctl)
EndIf
Next