Hello ....
Just follow this steps :
1- put groupbox1 and groupbox2 in same location via property tab.
2- set Visible attribute false for groupbox2
this.groupBox2.Visible = false ;
3- set Visible attribute false for groupbox1
this.groupBox1.Visible = false ;
4- in buttons code write this code :
private void btnShowGroupBox1_Click(object sender, EventArgs e)
{
this.groupBox1.Visible = !(this.groupBox2.Visible = false);
}
private void btnShowGroupBox2_Click(object sender, EventArgs e)
{
this.groupBox1.Visible = !(this.groupBox2.Visible = true);
}
and Enjoy ....