Home > .NET > Understanding MDI Applications in .NET Understanding MDI Applications in .NET Eugenia Loli 2006-05-14 .NET 14 Comments The multiple document interface (MDI) is handy when your program needs to open multiple documents of the same kind. Peter Aitken shows how to take advantage of the MDI support built right into the .NET Framework. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli 14 Comments 2006-05-15 12:39 am thebluesgnr …and I can’t believe people are still designing MDI applications. 2006-05-15 12:57 am RGCook Why would you say that? Could there be a benefit to having multiple forms open in a parent window. It is not necessarily limited to multiple open “documents” in a parent application you know. 2006-05-15 1:35 am Dave_K People criticise MDI, yet any browser without tabs would be considered crippled by many people. Tabs are becoming an common feature, various text editors, image viewers and file managers use tabs to display multiple documents/directories within one window. Of course a tabbed interface such as Firefox is a little different to Windows MDI, but it demonstrates that is it still useful to be able to contain multiple documents within one window. Tabs are more platform independent as they can fit into UIs without MDI such as Mac OS X, but MDI does have some significant advantages over a tabbed interface. For example, with MDI the documents contained in the window do not have to fill it, you can tile documents to view them side by side, while tabs are always maximised within their window. Of course MDI has some significant disadvantages and isn’t suitable for all applications, but there are circumstances where using MDI is still the best option. 2006-05-15 7:41 am zerblat Correct, the problem isn’t actually MDI but the insane idea of having document windows nested inside a useless fake desktop. I already have a desktop, why does the application feel that it needs to provide one of it’s own to obscure mine (and all my other windows)? Window-in-window MDI isn’t even proper MDI — there’s actually one window per document! 2006-05-15 5:50 pm Hautpflegespray For example, with MDI the documents contained in the window do not have to fill it, you can tile documents to view them side by side, while tabs are always maximised within their window. You could just let the window manager do the job. Why let the applications do the windows managing? 2006-05-16 1:28 am sappyvcv Did you miss the part about duplicate widgets? Especially in something like a word processor with lots of toolbars. Pay attention. 2006-05-15 3:28 am dylansmrjones Yes, it’s 2006 and I can’t believe people are still designing SDI applications… That’s a draw 2006-05-15 4:15 am edwdig Tabs = crippled MDI I personally can’t believe people think SDI is a good idea. It’s just not very feasible to view multiple documents at the same time in something such as a word processor using SDI. Fitting two Word windows on screen at once duplicates a lot of UI elements, leaving you with a rather limited amount of space to see the actual documents. You need to get a much higher resolution monitor to compensate. Also, what’s with the recent trend of removing the Window menu from applications? If you’re going to force things into seperate windows, at least make it easier to navigate between them. The taskbar becomes much slower to navigate as you clutter it with lots of windows. 2006-05-15 3:44 am StephenBeDoper MDI can be implemented badly, and it can be quite confusing to novices (“do I click the top or the bottom X?”) – and then there’s office2k, which couldn’t decide to be mdi or sdi. But implemented well, it’s quite useful – especially when working with many files in one program. Opera and EditPlus are good examples, they essentially have their own taskbars. Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/hspr-H102; Blazer/4.0) 16;320×320 2006-05-15 4:38 am sbenitezb Tabs. 2006-05-15 8:44 am memson In many ways, Windows just doesn’t do MDI very well. The Mac idea of having a global menu works better for MDI imo. Also, a desktop which lends itself to MDI via proper application control (XP comes close – making windows group in a single tab on the task bar, but not always.) BeOS always did this in a nice way. Deskbar always did a nice job of managing windows. 2006-05-15 9:22 am Havin_it I quite like MDI in terms of my typical workspace, which consists of Dreamweaver and Firefox. I’m quite used to Alt+Tab-ing between applications and then Ctrl_Tab-ing between documents/pages; that sort of hierarchical paradigm just seems natural to me now. If I want, I can also configure any tabbed-interface KDE apps I’m using to follow the Ctrl+Tab pattern too. It’s just too bad there isn’t a universally-adopted keyboard shortcut for this action now it is present in so many popular apps. I wouldn’t expect everyone to prefer this paradigm, though; many will prefer to be able to tab around everything at the same level, and why not? That’s why I advocate leaving the choice to the user, and Firefox and Konqueror are a fine example of this: with simple shortcuts, you can choose between new tabs or new windows. It’s also the one thing about IE7 becoming ‘insulated’ from Windows Explorer that kinda sucks: Windows won’t get a nifty tabbed file-manager. So my advice to developers would be: wherever possible, offer the choice. I might even use the GIMP occasionally if there was an option for MDI 2006-05-15 1:36 pm Zlogic It’s also the one thing about IE7 becoming ‘insulated’ from Windows Explorer that kinda sucks: Windows won’t get a nifty tabbed file-manager. First, IE may become much more secure as it won’t be able to do file management stuff (which can be exploited) Second, IE may be removed from Windows easily and replaced by something else. And third, drag’n’drop in tabbed interfaces is much more difficult – you have to drag the item on the destination tab, wait until the tab activates and only then drop your file. 2006-05-17 9:39 am Havin_it I agree the insulation is 99.5% a Good Thing(TM) – I did say it was the ‘one’ thing that sucked. Your third point is a good one (not that the others aren’t), and I must admit I prefer to have both locations open in front of me when I do drag’n’drop. In Konqueror that’s a snap, since I can divide up the viewport (to infinity, pretty much). I’d love to see Windows Explorer implement either this or a tabbed interface. I wouldn’t be too upset about the drag-to-tab issue, since it follows the paradigm of dragging onto taskbar buttons.