I have two forms named form1 and form2 respectively.
And a MDI form named mdi1.
I want to open form2 as a child of mdi1 when a button on form1 is clicked.
How can I do this please help me.

Add this code inside the button click event

form2 frm2=new form2();
frm2.MdiParent = mdi1.ActiveForm;
frm.Show();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.