01.
public
partial
class
Form1 : Form
02.
{
03.
Form2 f2 =
new
Form2();
04.
05.
public
Form1()
06.
{
07.
InitializeComponent();
08.
}
09.
10.
11.
private
void
button1_Click(
object
sender, EventArgs e)
12.
{
13.
this
.Hide();
14.
f2.ShowDialog();
15.
this
.Show();
16.
}
17.
}
18.
19.
Form2
20.
=====
21.
private
void
button1_Click(
object
sender, EventArgs e)
22.
{
23.
Form3 f3 =
new
Form3();
24.
25.
this
.Hide();
26.
this
.Close();
27.
f3.ShowDialog();
28.
this
.Show();
29.
}
30.
31.
Form3
32.
=====
33.
private
void
button1_Click(
object
sender, EventArgs e)
34.
{
35.
this
.Close();
36.
}