Private Sub Add_an_MDIWindowList_Tool_to_a_Toolbar_Load( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Dim frm As New ChildForm_ToolbarsManager() frm.MdiParent = Me frm.Show() End Sub
The WinToolbarsManager™ component has 15 different tool types that you can add to a ToolBar . This demonstrates how to create an MDIWindowList tool on a menu belonging to an MDI parent form. The MDIWindowList tool displays a list of the current open MDI child windows belonging to the parent. No code is required to achieve this behavior, just simply place an MDIWindowList tool on a menu and it handles the rest.
Set the IsMdiContainer property of the desired parent form to True.
Add the UltraToolbarsManager element from the Toolbox.
To configure the UltraWinToolbar element, open the design-time customizer by right-clicking on the UltraToolbarManager element and selecting "Customize".
To create a new Tool, click the "Tools" tab in the customizer, and then the "New…" button.
Select Popup Menu as your Tool Type and click on the Add button.
Select MDI Window List Tool as your Tool Type and click on the Add button.
Click the "ToolBars" tab in the customizer, and then the "New…" button.
Click the "Tools" tab and drag the Popup Menu Tool to the ToolBar residing on the form.
Drag the MdiWindowList tool to the Popup Menu Tool.
Add another form to the project.
Place the following code in the Form1_Load event procedure:
In Visual Basic:
Private Sub Add_an_MDIWindowList_Tool_to_a_Toolbar_Load( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Dim frm As New ChildForm_ToolbarsManager() frm.MdiParent = Me frm.Show() End Sub
In C#:
private void Add_an_MDIWindowList_Tool_to_a_Toolbar_Load( object sender, EventArgs e) { ChildForm frm = new ChildForm_ToolbarsManager(); frm.MdiParent = this; frm.Show(); }
Run your project and click to drop down the menu and you will see the MDIWindowList tool. ChildForm will have a check mark since it is the activated form.