按键的点击事件中加入如下代码就可以了(其中button的名字是button1,groupBox1,2分别是那两个groupbox。)private void button1_Click(object sender, EventArgs e) { groupBox1.Visible = true; groupBox2.Visible = false; }