Do you avoid using MDI forms?
Updated by Brady Stroud [SSW] 1 year ago. See history
123
MDI (Multiple Document Interface) forms should be avoided in most modern data-centric applications because they: - Are a hangover from the days of Windows 3.1 and Access 2.0 - Constrained within a smaller window - Only show as one window on the taskbar - Have no multiple monitor support (the killer reason) <imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "badExample", figure: 'Bad example - VS.NET with tabs is cool for developers, but not for the average knowledge worker', shouldDisplay: true }} src="/uploads/rules/do-you-avoid-using-mdi-forms/vs.net.jpg" /> <imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "badExample", figure: 'Bad example - Word 2003 in MDI mode', shouldDisplay: true }} src="/uploads/rules/do-you-avoid-using-mdi-forms/wordmdibad.gif" /> <figureEmbed figureEmbed={{ preset: "goodExample", figure: '<imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "default", figure: \'Good example - Word 2003 with Default Settings\', shouldDisplay: true }} src="/uploads/rules/do-you-avoid-using-mdi-forms/sdiexample.jpg" /> ```cs Me.IsMdiContainer = true; ClientForm frm = new ClientForm(); frm.MdiParent = this; frm.Show(); ```', shouldDisplay: true } } /> bad Figure: Bad code example - using MDI forms ::: ```cs ClientForm frm = new ClientForm(); frm.Show(); ``` <figureEmbed figureEmbed={{ preset: "goodExample", figure: 'Figure: Good example - not using MDI', shouldDisplay: true } } /> MDI forms have the advantage that the MDI parent form will have a collection **MdiChildren** which contains all of its child forms. This makes it very easy to find out which forms are already open, and to give these forms focus. Accomplishing this with an SDI application requires you to: - A global collection of forms - A line of code on the load and closed events of each form which adds / removes the form from the global collection **But what about tabs?** As developers, we love to use tabs similar Visual Studio.NET (figure below) and browsers such as Mozilla and CrazyBrowser. Tabs are great for developers, but standard business applications (e.g Sales Order System) should be developed as SDI (Single Document Interface). This is because users are used to Outlook and other office applications, which don't use MDIs at all. If the users want to group windows, Windows XP lets you "Group Similar Taskbar Icons".