Raghu
Raghu

Reputation: 29

How can Create MDI Forms

I am using C# I want code to Create MDI Child Forms. I want to Open a child class from Main Form Menu Item.

Upvotes: 0

Views: 76

Answers (1)

David Heffernan
David Heffernan

Reputation: 613451

You simply need to set the MdiParent property of the child form.

MyChildForm child = new MyChildForm();
child.MdiParent = this;//where 'this' refers to your main form
child.Show();

And you also need to have set IsMDIContainer = true for your main form.

There is a walkthrough of the basics on MSDN.

Upvotes: 1

Related Questions