没试过,不知道是不是这样
this.comboBox1.Enabled = this.textBox2.Enabled = this.textBox3.Enabled = this.button2.Enabled = this.button3.Enabled = false;
this.comboBox1.Enabled = this.textBox2.Enabled = this.textBox3.Enabled = this.button2.Enabled = this.button3.Enabled = false;
然后
foreach(Control c in GroundBox.Controls)
{
c.Enable =false;
}
foreach(Control c in controls)
{
if(c is Button)
{
c.Enable =false;
}
else
controls(c)
}