//disbable all except one thing foreach (Control child in this.Controls) { if (child != panel1) child.Enabled = false; }