Formlar Arası Geçiş 3 C#.NET(C.NET)…

FORM1 İÇERİSİNE YAZILACAK KODLAR
[code=’CSharp’]public partial class Form1 : Form
{
public Form2 frm2;
public Form3 frm3;
public Form1()
{
InitializeComponent();
frm2 = new Form2();
frm3 = new Form3();
frm2.frm1=this;
frm3.frm1 = this;
}
private void button1_Click(object sender, EventArgs e)
{
frm2.Show();
this.Hide();
}
private void button2_Click(object sender, EventArgs e)
{
frm3.Show();
this.Hide();
}
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
}
}[/code]

FORM2 İÇERİSİNE YAZILACAK KODLAR
[code=’Csharp’]
public partial class Form2 : Form
{
public Form1 frm1;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
frm1.Show();
this.Hide();
}
private void button2_Click(object sender, EventArgs e)
{
frm1.frm3.Show();
this.Hide();
}
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
}
}[/code]

FORM3 İÇERİSİNE YAZILACAK KODLAR
[code=’CSharp’]
public partial class Form3 : Form
{
public Form1 frm1;
public Form3()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
frm1.frm2.Show();
this.Hide();
}
private void button2_Click(object sender, EventArgs e)
{
frm1.Show();
this.Hide();
}
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
}
} [/code]