I'm building a flow layout panel whose each control represents for a room. I want to reload all room by removing all controls in the panel and adding new controls.
I used:
foreach(Control control in flowLayoutPanel.Controls)
{
flowLayoutPanel.Controls.Remove(control);
control.Dispose();
}
but some of controls couldn't be removed.
I tried to find a solution on the internet but found nowhere.
Could any body help?