i learned earlier how to move between two forms back and forth. but what if there are more forms? this is my code for form1:
Form2 form2 = new Form2();
private void aboutoldtrafford_MouseClick(object sender, MouseEventArgs e)
{
this.Hide();
form2.ShowDialog();
this.Show();
}
when i click the button I can go to form2 and there's two button there: back and next
private void backbutton_MouseClick(object sender, MouseEventArgs e)
{
this.DialogResult = DialogResult.OK;
}
Form3 form3 = new Form3();
private void nextbutton_MouseClick(object sender, MouseEventArgs e)
{
this.Hide();
form3.ShowDialog();
this.Show();
}
back button will return to form1 and the next button will go to form3. below is my code for form3. in form3, there are two buttons: back and finish
private void back_MouseClick(object sender, MouseEventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void finish_MouseClick(object sender, MouseEventArgs e)
{
this.Hide();
// i want to go back to form1
}
back button will return to form2 and the finish button will go back to form1. obviously, i cant do "this.DialogResult = DialogResult.OK;" in the finish button. how can i go back to form1 without going to form2? please help...