SDI and MDI Forms in VB.Net


The SDI and MDI forms are the interface design for document handling within a single Windows application. The MDI stands for Multiple Document Interface whereas SDI stands for Single Document Interface.

MDI: A multiple document Interface is one that allows viewing multiple windows within a large window.

SDI: A single Document Interface is one where all Windows appear independently of one another without the unification of a single parent window.

The Visual Basic IDE can be viewed in two ways:

  1. With the Multiple Document Interface (MDI)
  2. Single Document Interface (SDI)

MDI view shows all the distinct windows of Visual Bassic IDE as child windows within on large IDE Window.

In the SDI view, distinct windows of the Visual Basic IDE exist independently of each other.

MDI Forms

  • This is the main form or parent form which is not duplicated, but acts like a container for all the Windows which is also called the primary window.
  • The windows in which the individual documents are displayed are called Child Windows.
  • An MDI application must have atleast two form, the primary parent form and one or more child forms.
  • The parent form may not contain any controls. While the parent Form is open in design mode, the icon on the tool box are not displayed, but you can’t place any control on the form.
  • The parent form usually have a menu.

To create an MDI form follow these steps

  • Start a new project and then choose: Project -> Add MDI Form to add the parent form.
  • Set the Forms caption to MDI window.
  • Choose Project -> Add Form to add a SDI window.
  • Make this form as child of MDI form by setting the MDI child property of the SDI form to True. Set the caption propety to MDI child window.