open the new form with in the another form button click event

May 21 2010 4:45 AM

hai,
i have 2 forms names are form1,form2
with in the form1 in button click event i want open the new form that is form2 and form 2 is close.
for this i write
button1_click( object sender,eventargs e)
{  form2 f2=new form2();
form2.show();
this.close();
}
but here 2 forms will close that is the problem dont suggest hide() method
if you know any other way to open form2 tell to me.......

Answers (3)