3
Answers

Can child form open another form in parent container?

Maria

Maria

15y
7.7k
1
I want a child form to open up another form within the parent.  For example...

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'.  :(

Answers (3)