I have a total of 4 forms(Form1,form2,form3,form4).
3 buttons(Form 1 has 2(Button1,Button2),form 2 has 1(Button3))
My situation is as follows:
Both buttons in Form1 lead to form2 but with different label inputs.
What I want to do is when my button 3 is clicked, and if else loop would determine what form the button leads to(form3,form4). If button1 was clicked, button 3 would lead to form3 else button3 would lead to form4.
im not sure where and what part of my code I should include while asking this question so I assume I should just put the button codes.
This is button1 code:
public void DIModuleButton_Click(object sender, System.EventArgs e)
{
// MessageBox.Show("TEST");
alloDI();
FormSerial frm = new FormSerial();
frm.MyProperty = ALL;
frm.Show();
}
public void alloDI()
{
ALL = "DI";
}
this is button2 code:
public void DOModuleButton_Click(object sender, EventArgs e)
{
alloDO();
FormSerial frm = new FormSerial();
frm.MyProperty = ALL;
frm.Show();
}
public void alloDO()
{
ALL = "DO";
}