I have dynamically generated controls on the panels of windows form and i have also generated a button for removing the controls, all in rows.
int c = 0;
pri
Remove control events. From MSDN:
To remove controls from a collection programmatically
- Remove the event handler from the event. In Visual Basic, use the RemoveHandler Statement keyword; in Visual C#, use the -= Operator (C# Reference).
- Use the Remove method to delete the desired control from the panel's Controls collection.
- Call the Dispose method to release all the resources used by the control.
Specific examples are given using VB and C# in the linked page.