example of a form.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Button button1 = new Button();
button1.Text = "Click Me";
button1.Click += new System.EventHandler(this.button1_Click);
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
Form f = new Form();
f.Closed += new EventHandler(f_Closed);
f.Show();
}
void f_Closed(object sender, EventArgs e)
{
this.Show();
}
}