We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to duplicate MS Office like MDI behavior

I have an application in which I would like to emulate the MDI behavior as seen in some of the Microsoft Office applications, particularly Word. However I can't seem to figure out how to do this with the traditional MDI development in .NET. I would like to have the following behavior as shown in Word 2000 for example: 1. Each MDI child is it's own complete window that shows in the task bar. 2. Merged menus and toolbars aren't needed (as shown in Word when no MDI child is loaded, all the menu/toolbar items stick around and just become disabled. 3. The list of MDI children appears in a Window list (however for my app I don't need to do any Arranging or Splitting). 4. When only one document is opened in Word, a Close Window button (a "X") appears on the right-hand side of the main menu bar. As soon as more than one document is opened, this System-like button disappears. There is no way to maximize or minimize the document within the 'parent'. I have been able to programmatically duplicate the first three above by just using regular Windows Forms and having the 'child' be made up of User Controls and Panels that appear in the 'parent' form. And then behind the scenes I have an 'organizer' object that manages the Windows and things common between them. But item #4 eludes me. Is this possible? Trying to have an 'always maximized' MDI child within each main window doesn't work as the system buttons will always appear no matter what (and will even allow you to Restore to a non-maximized state). Do I have to somehow be able to fake it by having a regular button on the main menu to act like a System Close button? Thanks in advance for any pointers, -David

Live Chat Icon For mobile
Up arrow icon