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 KathiRank #8,369 · 223 reputationPosted Apr 29, 2009, 10:16 AM EDT
public void Button1_Click(...)
{
Form3 obj = new Form3();
//obj.MDIParent= Form1;
obj.MDIParent= this.MDIParent;
obj.Show();
}
Maria71 reputationPosted Apr 29, 2009, 10:37 AM EDT
sai alla2 reputationPosted May 14, 2009, 8:11 PM EDT