form1 is the parent and form2 is the child. I want when I click a button in form2 form3 opens within form1.
I tried
public void Button1_Click(...)
{
Form3 obj = new Form3();
obj.MDIParent= Form1;
obj.Show();
}
but I got an error stating 'WindowsApplication1.Form1' is a 'type' but is used as a 'variable'. :(
Satish KathiPosted Apr 29, 2009, 2:16 PM
public void Button1_Click(...)
{
Form3 obj = new Form3();
//obj.MDIParent= Form1;
obj.MDIParent= this.MDIParent;
obj.Show();
}
sai allaPosted May 15, 2009, 12:11 AM
MariaPosted Apr 29, 2009, 2:37 PM