MDI Applications

From RAD Studio
Jump to: navigation, search

Go Up to GUI Applications

To create a new MDI application using a wizard:

  1. Choose File > New > Other to bring up the New Items dialog.
  2. Click on the Projects page and double-click MDI Application.
  3. Click OK.

MDI applications require more planning and are somewhat more complex to design than SDI applications. MDI applications spawn child windows that reside within the client window; the main form contains child forms. Set the FormStyle property of the TForm object to specify whether a form is a child (fsMDIChild) or main form (fsMDIForm). It is a good idea to define a base class for your child forms and derive each child form from this class, to avoid having to reset the child form's properties.

MDI applications often include a Window pop-up on the main menu that has items such as Cascade and Tile for viewing multiple windows in various styles. When a child window is minimized, its icon is located in the MDI parent form.

To create a new MDI application without using a wizard

  1. Create the main window form or MDI parent window. Set its FormStyle property to fsMDIForm.
  2. Create a menu for the main window that includes:
    • File > Open
    • File > Save
    • Window, with Cascade, Tile, and Arrange All items
  3. Create the MDI child forms and set their FormStyle properties to fsMDIChild.


Note: MDI main forms and child forms have limited support for High-DPI displays.

See Also