C1Command has a C1CommandMdiList command type used to create a Window list for an MDI (Multiple Document Interface) form. A Window list is useful for keeping track of the various MDI child windows an application has open.
To create a Window list for an MDI form, complete the following steps:
Set the following properties:
Command Name | Command Type | Command Text |
---|---|---|
cmdFile | C1CommandMenu | &File |
cmdFileNew | C1Command | &New |
Set the following properties:
Command Name | Command Type | Command Text |
---|---|---|
cmdWindow | C1CommandMenu | &Window |
c1CommandMdiList1 | C1CommandMdiList | <MDI Windows List> |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Private Sub createNewMdiChild() Dim mc As New MdiChild() mc.MdiParent = Me mc.Text = String.Format("MDI Child Window {0}", Me.MdiChildren.Length) mc.Show() End Sub |
To write code in C#
C# |
Copy Code
|
---|---|
private void createNewMdiChild() { MdiChild mc = new MdiChild(); mc.MdiParent = this; mc.Text = string.Format("MDI Child Window {0}", this.MdiChildren.Length); mc.Show(); } |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
createNewMdiChild() |
To write code in C#
C# |
Copy Code
|
---|---|
CreateNewMdiChild(); |
The C1CommandMdiList expands to the list of available MDI child windows.