WindowList Property

See Also88RS0Z9                 Example1AL11Z>Low

Applies To



Specifies whether a menu maintains a list of the current MDI child windows in an MDI form.  Read-only at run time.




The WindowList property settings are:

Setting             Description


True                 The menu maintains a list of open windows and displays a check mark next to the currently active window.  Users can click a window name to activate that window.

False                (Default) The menu does not maintain a list of open windows.



Many Multiple-Document Interface (MDI) applications, such as Microsoft Excel and Microsoft Word for Windows, have a Window menu containing a list of open MDI child windows.  This property enables you to add this functionality to your application.

Only one menu control on a form can have a WindowList.

When you set WindowList to True on a menu control, the WindowList menu structure is appended to the menu items indented below it.

Data Type

IntegerDOKXHY (Boolean)

See Also


Caption PropertyF6ZZXB

Creating a Menu Bar1DSHCUG

Menu Design WindowV4GKGG


Programmer's Guide:

Chapter 4, "Menus and Dialogs"

Chapter 14, "Multiple-Document Interface (MDI) Applications"

WindowList Property Example

The example creates some menu commands, illustrates the WindowList menu functionality, and shows how to enable your users to add new forms to an MDI application.  To try this example, create an MDI form with the New MDI Form command on the File menu.  On Form1, set the MDIChild property to True and create a menu named "File."  On your Window menu, click the WindowList check box.  On your File menu, create a "New" command, set Name to "FileMenu," and set Index to 0 (to create a control array).  Copy the code into the Declarations section and press F5 to run the program.

Sub Form_Load ()
  FileMenu(0).Caption = "&New"          ' Set access key in caption.
  Load FileMenu(1)                      ' Create new menu item.
  FileMenu(1).Caption = "-"             ' Set separator.
  Load FileMenu(2)                      ' Create new menu item.
  FileMenu(2).Caption = "E&xit"         ' Set caption and access key.
End Sub

Sub FileMenu_Click (Index As Integer)
  Select Case Index
    Case 0                              ' New.
      Dim NewForm As New Form1          ' Create a duplicate of Form1.
      ' Load NewForm and set a unique caption.
      NewForm.Caption = "Untitled" + Forms.Count
    Case 2                              ' Exit.
      End                               ' End the program.
  End Select
End Sub