Search code examples
c#formspanelmdi

C# Panel As MDI Container


In C# i want to create a panel that has the properties of a MDI container ie. isMdiContainer = true.

I tried something like this

form.MDIParent = this.panel1;

But that dont work. Any suggestions?


Solution

  • You could create custom form, remove all borders, and toolbars to make it look as closely to a panel as possible. Then make that new custom form a MdiContainer.

    Basically, you can only set the IsMDIContainer property on a Form. This means that only a form can be a MdiContainer.