for (int i = 0; i < this.groupBox2.Controls.Count; i++) { this.groupBox2.Controls[i].Enabled = false; }