RAD Studio |  |

MDI Applications
See Also
Collapse All
To create a new MDI application using a wizard:

1. Choose FileNewOther 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 FileOpen, FileSave, and Window which has Cascade, Tile, and Arrange All items.
3. Create the MDI child forms and set their FormStyle properties to fsMDIChild.

See Also

TForm

TScreen

TApplication

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!