I have 3 forms on my project.
form1is MDI controllerform2andform3are MDI children
How do I create form1 as the parent and form2 and form3 as children?
Something like old MFC’s MDI interface:
Imagine form2 is the parent and has a button. If clicked, it must open form3 in the parent form (form1). How do I set this up?

Firstly, make sure Form1’s
IsMdiContaineris set totrue.Then instantiate Form1 and Form2, setting Form1 to be Form2’s MdiParent:
In Form2’s code, have something like the following to handle the button’s click event to instantiate Form3.
As a couple notes, this code is really quick and dirty. There are several undesirable things about it like the coupling of Form2 and Form3 (as well as unhelpful class names Form1, Form2, and Form3). Ideally, you’d decouple Form2 and Form3 by raising an event from Form2 that your forms container can hook onto and instantiate Form3. This sample code is meant to give you a direction.