Version

Create an MDI Window List

The MDIWindowList tool is a list tool to document all open MDI forms in the application and when you select one form from the list it will bring that form to the forefront and give it focus. It also gives you options to close all the windows, tile horizontally, vertically, minimize all windows, and cascade them.

  1. Open the Customize editor for the element, create and add a PopUpMenu and Button tool to a toolbar that you have placed on an MDI parent form.

  2. Create a MDIWindowList tool and add the MDIWindowList to the popup menu by dragging it towards the menu tool until the drop cursor is displayed and then dropping it.

  3. Besides listing all the open forms in the MDI application you can list different commands for the user to choose for a visual display of the open forms. The following is a list of available properties.

Property Description

DisplayArrangeIconsCommand

Will arrange all minimized windows in the lower left corner of the parent form.

DisplayCascadeCommand

Will cascade all the open forms.

DisplayCheckmark

Will display a check mark next to the form that has focus.

DisplayCloseWindowsCommand

Will close all open forms.

DisplayMinimizeCommand

Will minimize all the open forms.

DisplayTileHorizontalCommand

Will tile all open forms in a horizontal appearance.

DisplayTileVerticalCommand

Will tile all open forms in a vertical appearance.

  1. The DisplayCheckmark property takes a Boolean value but the others can be set to Hide, DisplayOnMenu, DisplayOnDialog or DisplayOnMenuAndDialog. (Dialog in this case means the "More Windows…​" dialog.)

  2. In the ToolClick event for the button tool, add code to display several MDI child forms. Run the project, display a number of child forms then display your MDIWindowList tool and you will see the text for all the open forms listed.