hi
this is sooo frustrating
i have 2 forms
i hide form 1, and form 2 is shown
when i click a button on form 2, i want that form 2 to hide and form 1 to be shown again
how?
Printable View
hi
this is sooo frustrating
i have 2 forms
i hide form 1, and form 2 is shown
when i click a button on form 2, i want that form 2 to hide and form 1 to be shown again
how?
pass a reference of each form to the other form when they are created, then acccess its methods.
??
dunno if this help.
in the frm1:
in the frm2:VB Code:
void Button1_Click(object sender,EventArgs e) { Form f=new frm2(this); this.Hide(); f.Show(); }
:afrog:VB Code:
public frm2(Form f) { this.f=f; } Form f; void Button2_Click(object sender,EventArgs e) { f.Show(); this.Hide(); }