VB.Net/GUI/MDI

Материал из VB Эксперт
Версия от 12:43, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Make a form to be MDI form

Imports System
Imports System.Collections
Imports System.Data
Imports System.IO
Imports System.Xml.Serialization
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Printing

Public Class MainClass
    Shared Sub Main()
       Dim form1 As Form = New Form1()
       Application.Run(form1) 
     End Sub
End Class



Public Class Form1
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.Container
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        "
        "Form1
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
        Me.ClientSize = New System.Drawing.Size(292, 268)
        Me.Name = "Form1"
        Me.Text = "MDI Example 1"
    End Sub
#End Region
    Private Sub Form1_Load(ByVal sender As System.Object, _
   ByVal e As System.EventArgs) _
   Handles MyBase.Load
        Me.Text = "I"m an MDI Parent"
        Me.IsMdiContainer = True
        Dim MyChild As New System.Windows.Forms.Form()
        MyChild.MdiParent = Me
        MyChild.Show()
        MyChild.Text = "MDI Child"
    End Sub
End Class


MDI: display children window name in a tree

Imports System
Imports System.Drawing
Imports System.Collections
Imports System.ruponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Configuration
Imports System.Resources
Public Class ChildForm
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.IContainer
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    Friend WithEvents mainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents menuItem11 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents cmdFileClose As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem13 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem5 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem4 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem6 As System.Windows.Forms.MenuItem
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.mainMenu1 = New System.Windows.Forms.MainMenu()
        Me.menuItem11 = New System.Windows.Forms.MenuItem()
        Me.menuItem1 = New System.Windows.Forms.MenuItem()
        Me.cmdFileClose = New System.Windows.Forms.MenuItem()
        Me.menuItem13 = New System.Windows.Forms.MenuItem()
        Me.menuItem5 = New System.Windows.Forms.MenuItem()
        Me.menuItem4 = New System.Windows.Forms.MenuItem()
        Me.menuItem6 = New System.Windows.Forms.MenuItem()
        "
        "mainMenu1
        "
        Me.mainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.menuItem11, Me.menuItem13})
        "
        "menuItem11
        "
        Me.menuItem11.Index = 0
        Me.menuItem11.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.menuItem1, Me.cmdFileClose})
        Me.menuItem11.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        Me.menuItem11.Text = "&File"
        "
        "menuItem1
        "
        Me.menuItem1.Index = 0
        Me.menuItem1.MergeOrder = 1
        Me.menuItem1.Text = "&Save"
        "
        "cmdFileClose
        "
        Me.cmdFileClose.Index = 1
        Me.cmdFileClose.MergeOrder = 1
        Me.cmdFileClose.Text = "&Close"
        "
        "menuItem13
        "
        Me.menuItem13.Index = 1
        Me.menuItem13.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.menuItem5, Me.menuItem4, Me.menuItem6})
        Me.menuItem13.MergeOrder = 1
        Me.menuItem13.Text = "&Edit"
        "
        "menuItem5
        "
        Me.menuItem5.Index = 0
        Me.menuItem5.Text = "Cu&t"
        "
        "menuItem4
        "
        Me.menuItem4.Index = 1
        Me.menuItem4.Text = "&Copy"
        "
        "menuItem6
        "
        Me.menuItem6.Index = 2
        Me.menuItem6.Text = "&Paste"
        "
        "ChildForm
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(168, 147)
        Me.Menu = Me.mainMenu1
        Me.Name = "ChildForm"
        Me.Text = "MDI Child"
    End Sub
#End Region
    Private Sub cmdFileClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdFileClose.Click
        Close()
    End Sub
End Class
Public Class ParentForm
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.IContainer
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    Friend WithEvents cmdCascade As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem7 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem3 As System.Windows.Forms.MenuItem
    Friend WithEvents cmdWindowArrangeIcons As System.Windows.Forms.MenuItem
    Friend WithEvents cmdWindowTileChildrenVert As System.Windows.Forms.MenuItem
    Friend WithEvents cmdWindowTileChildrenHoriz As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem8 As System.Windows.Forms.MenuItem
    Friend WithEvents statusBar1 As System.Windows.Forms.StatusBar
    Friend WithEvents cmdFileNewChild As System.Windows.Forms.MenuItem
    Friend WithEvents cmdFileExit As System.Windows.Forms.MenuItem
    Friend WithEvents treeView1 As System.Windows.Forms.TreeView
    Friend WithEvents mainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents menuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents menuItem9 As System.Windows.Forms.MenuItem
    Friend WithEvents splitter1 As System.Windows.Forms.Splitter
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cmdCascade = New System.Windows.Forms.MenuItem()
        Me.menuItem7 = New System.Windows.Forms.MenuItem()
        Me.menuItem3 = New System.Windows.Forms.MenuItem()
        Me.cmdWindowArrangeIcons = New System.Windows.Forms.MenuItem()
        Me.cmdWindowTileChildrenVert = New System.Windows.Forms.MenuItem()
        Me.cmdWindowTileChildrenHoriz = New System.Windows.Forms.MenuItem()
        Me.menuItem8 = New System.Windows.Forms.MenuItem()
        Me.statusBar1 = New System.Windows.Forms.StatusBar()
        Me.cmdFileNewChild = New System.Windows.Forms.MenuItem()
        Me.cmdFileExit = New System.Windows.Forms.MenuItem()
        Me.treeView1 = New System.Windows.Forms.TreeView()
        Me.mainMenu1 = New System.Windows.Forms.MainMenu()
        Me.menuItem1 = New System.Windows.Forms.MenuItem()
        Me.menuItem9 = New System.Windows.Forms.MenuItem()
        Me.splitter1 = New System.Windows.Forms.Splitter()
        Me.SuspendLayout()
        "
        "cmdCascade
        "
        Me.cmdCascade.Index = 1
        Me.cmdCascade.Text = "&Cascade"
        "
        "menuItem7
        "
        Me.menuItem7.Index = 4
        Me.menuItem7.Text = "-"
        "
        "menuItem3
        "
        Me.menuItem3.Index = 1
        Me.menuItem3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.cmdWindowArrangeIcons, Me.cmdCascade, Me.cmdWindowTileChildrenVert, Me.cmdWindowTileChildrenHoriz, Me.menuItem7, Me.menuItem8})
        Me.menuItem3.MergeOrder = 2
        Me.menuItem3.Text = "&Window"
        "
        "cmdWindowArrangeIcons
        "
        Me.cmdWindowArrangeIcons.Index = 0
        Me.cmdWindowArrangeIcons.Text = "&Arrange Icons"
        "
        "cmdWindowTileChildrenVert
        "
        Me.cmdWindowTileChildrenVert.Index = 2
        Me.cmdWindowTileChildrenVert.Text = "Tile Children &Vertically"
        "
        "cmdWindowTileChildrenHoriz
        "
        Me.cmdWindowTileChildrenHoriz.Index = 3
        Me.cmdWindowTileChildrenHoriz.Text = "Tile Children &Horizontally"
        "
        "menuItem8
        "
        Me.menuItem8.Index = 5
        Me.menuItem8.MdiList = True
        Me.menuItem8.Text = "Window&s"
        "
        "statusBar1
        "
        Me.statusBar1.Location = New System.Drawing.Point(0, 179)
        Me.statusBar1.Name = "statusBar1"
        Me.statusBar1.Size = New System.Drawing.Size(352, 22)
        Me.statusBar1.TabIndex = 4
        Me.statusBar1.Text = "Ready"
        "
        "cmdFileNewChild
        "
        Me.cmdFileNewChild.Index = 0
        Me.cmdFileNewChild.Shortcut = System.Windows.Forms.Shortcut.CtrlN
        Me.cmdFileNewChild.Text = "&New Child"
        "
        "cmdFileExit
        "
        Me.cmdFileExit.Index = 2
        Me.cmdFileExit.MergeOrder = 2
        Me.cmdFileExit.Text = "E&xit"
        "
        "treeView1
        "
        Me.treeView1.Dock = System.Windows.Forms.DockStyle.Left
        Me.treeView1.ImageIndex = -1
        Me.treeView1.Location = New System.Drawing.Point(3, 0)
        Me.treeView1.Name = "treeView1"
        Me.treeView1.Nodes.AddRange(New System.Windows.Forms.TreeNode() {New System.Windows.Forms.TreeNode("Children")})
        Me.treeView1.SelectedImageIndex = -1
        Me.treeView1.Size = New System.Drawing.Size(121, 179)
        Me.treeView1.TabIndex = 5
        "
        "mainMenu1
        "
        Me.mainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.menuItem1, Me.menuItem3})
        "
        "menuItem1
        "
        Me.menuItem1.Index = 0
        Me.menuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.cmdFileNewChild, Me.menuItem9, Me.cmdFileExit})
        Me.menuItem1.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        Me.menuItem1.Text = "&File"
        "
        "menuItem9
        "
        Me.menuItem9.Index = 1
        Me.menuItem9.MergeOrder = 2
        Me.menuItem9.Text = "-"
        "
        "splitter1
        "
        Me.splitter1.Name = "splitter1"
        Me.splitter1.Size = New System.Drawing.Size(3, 179)
        Me.splitter1.TabIndex = 6
        Me.splitter1.TabStop = False
        "
        "ParentForm
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(352, 201)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.treeView1, Me.splitter1, Me.statusBar1})
        Me.IsMdiContainer = True
        Me.Menu = Me.mainMenu1
        Me.Name = "ParentForm"
        Me.Text = "MDI Parent"
        Me.ResumeLayout(False)
    End Sub
#End Region
    Dim nextChild As Integer = 1

    Public Sub ChildClosed(ByVal sender As Object, ByVal e As EventArgs)
        Dim node As TreeNode
        For Each node In treeView1.Nodes(0).Nodes
            If node.Tag Is sender Then
                treeView1.Nodes(0).Nodes.Remove(node)
                Exit For
            End If
        Next
    End Sub
    Private Sub cmdFileNewChild_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdFileNewChild.Click
        Dim child As Form = New ChildForm()
        child.Text = "Child " & nextChild.ToString()
        AddHandler child.Closed, AddressOf ChildClosed
        nextChild = nextChild + 1
        child.MdiParent = Me
        child.Show()
        Dim node As TreeNode = New TreeNode(child.Text)
        node.Tag = child
        treeView1.Nodes(0).Nodes.Add(node)
        treeView1.Nodes(0).Expand()
    End Sub
    Private Sub cmdFileExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdFileExit.Click
        Close()
    End Sub
    Private Sub cmdWindowArrangeIcons_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdWindowArrangeIcons.Click
        Me.LayoutMdi(MdiLayout.ArrangeIcons)
    End Sub
    Private Sub cmdCascade_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCascade.Click
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub
    Private Sub cmdWindowTileChildrenVert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdWindowTileChildrenVert.Click
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub
    Private Sub cmdWindowTileChildrenHoriz_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdWindowTileChildrenHoriz.Click
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub
    Private Sub treeView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles treeView1.Click
        Dim child As Form
        If TypeOf (treeView1.SelectedNode.Tag) Is Form Then
            child = CType(treeView1.SelectedNode.Tag, Form)
        End If
        If Not child Is Nothing Then child.Activate()
    End Sub
End Class
Public Class MainClass
    Shared Sub Main()
        Dim myform As Form = New ParentForm()
        Application.Run(myform)
    End Sub
End Class


MDI Frame Demo

Imports System
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports System.ruponentModel
Imports System.Windows.Forms
Imports System.IO
Public Class MainClass
    
    Shared Sub Main(ByVal args As String())
        Dim myform As Form = New MDIParent1()
        Application.Run(myform)
    End Sub
End Class


Public Class MDIParent1
    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripMenuItem.Click, NewToolStripButton.Click, NewWindowToolStripMenuItem.Click
        Dim frm As New Form1
        frm.MdiParent = Me
        frm.Show()
    End Sub
    Private Sub OpenFile(ByVal sender As Object, ByVal e As EventArgs) Handles OpenToolStripMenuItem.Click, OpenToolStripButton.Click
        Dim dlgOpen As New OpenFileDialog
        If dlgOpen.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
            Dim frm As New Form1
            frm.txtContents.Text = File.ReadAllText(dlgOpen.FileName)
            frm.txtContents.Select(0, 0)
            frm.Text = New FileInfo(dlgOpen.FileName).Name
            frm.MdiParent = Me
            frm.Show()
        End If
    End Sub
    Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SaveAsToolStripMenuItem.Click
        Dim SaveFileDialog As New SaveFileDialog
        SaveFileDialog.InitialDirectory = My.ruputer.FileSystem.SpecialDirectories.MyDocuments
        SaveFileDialog.Filter = "Text Files (*.txt)|*.txt"
        SaveFileDialog.ShowDialog(Me)
        Dim FileName As String = SaveFileDialog.FileName
        MessageBox.Show(FileName+ "Saved.")
    End Sub
    Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ExitToolStripMenuItem.Click
        Me.Close()
    End Sub
    Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CutToolStripMenuItem.Click
        MessageBox.Show("Cut")
    End Sub
    Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CopyToolStripMenuItem.Click
        MessageBox.Show("Copy")
    End Sub
    Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PasteToolStripMenuItem.Click
        MessageBox.Show("Paste")
    End Sub
    Private Sub ToolBarToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ToolBarToolStripMenuItem.Click
        Me.ToolStrip.Visible = Me.ToolBarToolStripMenuItem.Checked
    End Sub
    Private Sub StatusBarToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles StatusBarToolStripMenuItem.Click
        Me.StatusStrip.Visible = Me.StatusBarToolStripMenuItem.Checked
    End Sub
    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CascadeToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub
    Private Sub TileVerticleToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles TileVerticalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub
    Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles TileHorizontalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub
    Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ArrangeIconsToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.ArrangeIcons)
    End Sub
    Private Sub MinimizeAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MinimizeAllToolStripMenuItem.Click
        For Each frm As Form In Me.MdiChildren
            frm.WindowState = FormWindowState.Minimized
        Next frm
    End Sub
    Private Sub RestoreAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RestoreAllToolStripMenuItem.Click
        For Each frm As Form In Me.MdiChildren
            frm.WindowState = FormWindowState.Normal
        Next frm
    End Sub
    Private Sub MaximizeAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MaximizeAllToolStripMenuItem.Click
        For Each frm As Form In Me.MdiChildren
            frm.WindowState = FormWindowState.Maximized
        Next frm
    End Sub
    Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CloseAllToolStripMenuItem.Click
        For Each frm As Form In Me.MdiChildren
            frm.Close()
        Next
    End Sub
End Class

<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class MDIParent1
    Inherits System.Windows.Forms.Form
    "Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    "Required by the Windows Form Designer
    Private components As System.ruponentModel.IContainer
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.ruponents = New System.ruponentModel.Container
        "Dim resources As System.ruponentModel.ruponentResourceManager = New System.ruponentModel.ruponentResourceManager(GetType(MDIParent1))
        Me.ContentsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.HelpMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.IndexToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.SearchToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator
        Me.AboutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ArrangeIconsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.CloseAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.NewWindowToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.WindowsMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.CascadeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.TileVerticalToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.TileHorizontalToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.OptionsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.HelpToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator
        Me.PrintPreviewToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.ToolTip = New System.Windows.Forms.ToolTip(Me.ruponents)
        Me.ToolStripStatusLabel = New System.Windows.Forms.ToolStripStatusLabel
        Me.StatusStrip = New System.Windows.Forms.StatusStrip
        Me.PrintToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.NewToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.ToolStrip = New System.Windows.Forms.ToolStrip
        Me.OpenToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.SaveToolStripButton = New System.Windows.Forms.ToolStripButton
        Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
        Me.PrintPreviewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.PrintToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator
        Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator5 = New System.Windows.Forms.ToolStripSeparator
        Me.PrintSetupToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.SaveAsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.NewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.FileMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.OpenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator
        Me.SaveToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.MenuStrip = New System.Windows.Forms.MenuStrip
        Me.EditMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.UndoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.RedoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator
        Me.CutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.CopyToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.PasteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator7 = New System.Windows.Forms.ToolStripSeparator
        Me.SelectAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ViewMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolBarToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.StatusBarToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolsMenu = New System.Windows.Forms.ToolStripMenuItem
        Me.MaximizeAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.MinimizeAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.RestoreAllToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.StatusStrip.SuspendLayout()
        Me.ToolStrip.SuspendLayout()
        Me.MenuStrip.SuspendLayout()
        Me.SuspendLayout()
        "
        "ContentsToolStripMenuItem
        "
        Me.ContentsToolStripMenuItem.Name = "ContentsToolStripMenuItem"
        Me.ContentsToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F1), System.Windows.Forms.Keys)
        Me.ContentsToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.ContentsToolStripMenuItem.Text = "&Contents"
        "
        "HelpMenu
        "
        Me.HelpMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ContentsToolStripMenuItem, Me.IndexToolStripMenuItem, Me.SearchToolStripMenuItem, Me.ToolStripSeparator8, Me.AboutToolStripMenuItem})
        Me.HelpMenu.Name = "HelpMenu"
        Me.HelpMenu.Size = New System.Drawing.Size(49, 20)
        Me.HelpMenu.Text = "&Help"
        "
        "IndexToolStripMenuItem
        "
        "Me.IndexToolStripMenuItem.Image = CType(resources.GetObject("IndexToolStripMenuItem.Image"), System.Drawing.Image)
        Me.IndexToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.IndexToolStripMenuItem.Name = "IndexToolStripMenuItem"
        Me.IndexToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.IndexToolStripMenuItem.Text = "&Index"
        "
        "SearchToolStripMenuItem
        "
        "Me.SearchToolStripMenuItem.Image = CType(resources.GetObject("SearchToolStripMenuItem.Image"), System.Drawing.Image)
        Me.SearchToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.SearchToolStripMenuItem.Name = "SearchToolStripMenuItem"
        Me.SearchToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.SearchToolStripMenuItem.Text = "&Search"
        "
        "ToolStripSeparator8
        "
        Me.ToolStripSeparator8.Name = "ToolStripSeparator8"
        Me.ToolStripSeparator8.Size = New System.Drawing.Size(191, 6)
        "
        "AboutToolStripMenuItem
        "
        Me.AboutToolStripMenuItem.Name = "AboutToolStripMenuItem"
        Me.AboutToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.AboutToolStripMenuItem.Text = "&About ..."
        "
        "ArrangeIconsToolStripMenuItem
        "
        Me.ArrangeIconsToolStripMenuItem.Name = "ArrangeIconsToolStripMenuItem"
        Me.ArrangeIconsToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.ArrangeIconsToolStripMenuItem.Text = "&Arrange Icons"
        "
        "CloseAllToolStripMenuItem
        "
        Me.CloseAllToolStripMenuItem.Name = "CloseAllToolStripMenuItem"
        Me.CloseAllToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.CloseAllToolStripMenuItem.Text = "C&lose All"
        "
        "NewWindowToolStripMenuItem
        "
        Me.NewWindowToolStripMenuItem.Name = "NewWindowToolStripMenuItem"
        Me.NewWindowToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.NewWindowToolStripMenuItem.Text = "&New Window"
        "
        "WindowsMenu
        "
        Me.WindowsMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewWindowToolStripMenuItem, Me.CascadeToolStripMenuItem, Me.TileVerticalToolStripMenuItem, Me.TileHorizontalToolStripMenuItem, Me.MinimizeAllToolStripMenuItem, Me.MaximizeAllToolStripMenuItem, Me.RestoreAllToolStripMenuItem, Me.CloseAllToolStripMenuItem, Me.ArrangeIconsToolStripMenuItem})
        Me.WindowsMenu.Name = "WindowsMenu"
        Me.WindowsMenu.Size = New System.Drawing.Size(78, 20)
        Me.WindowsMenu.Text = "&Windows"
        "
        "CascadeToolStripMenuItem
        "
        Me.CascadeToolStripMenuItem.Name = "CascadeToolStripMenuItem"
        Me.CascadeToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.CascadeToolStripMenuItem.Text = "&Cascade"
        "
        "TileVerticalToolStripMenuItem
        "
        Me.TileVerticalToolStripMenuItem.Name = "TileVerticalToolStripMenuItem"
        Me.TileVerticalToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.TileVerticalToolStripMenuItem.Text = "Tile &Vertical"
        "
        "TileHorizontalToolStripMenuItem
        "
        Me.TileHorizontalToolStripMenuItem.Name = "TileHorizontalToolStripMenuItem"
        Me.TileHorizontalToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.TileHorizontalToolStripMenuItem.Text = "Tile &Horizontal"
        "
        "OptionsToolStripMenuItem
        "
        Me.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem"
        Me.OptionsToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
        Me.OptionsToolStripMenuItem.Text = "&Options"
        "
        "HelpToolStripButton
        "
        Me.HelpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.HelpToolStripButton.Image = CType(resources.GetObject("HelpToolStripButton.Image"), System.Drawing.Image)
        Me.HelpToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.HelpToolStripButton.Name = "HelpToolStripButton"
        Me.HelpToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.HelpToolStripButton.Text = "Help"
        "
        "ToolStripSeparator2
        "
        Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
        Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
        "
        "PrintPreviewToolStripButton
        "
        Me.PrintPreviewToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.PrintPreviewToolStripButton.Image = CType(resources.GetObject("PrintPreviewToolStripButton.Image"), System.Drawing.Image)
        Me.PrintPreviewToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.PrintPreviewToolStripButton.Name = "PrintPreviewToolStripButton"
        Me.PrintPreviewToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.PrintPreviewToolStripButton.Text = "Print Preview"
        "
        "ToolStripStatusLabel
        "
        Me.ToolStripStatusLabel.Name = "ToolStripStatusLabel"
        Me.ToolStripStatusLabel.Size = New System.Drawing.Size(47, 17)
        Me.ToolStripStatusLabel.Text = "Status"
        "
        "StatusStrip
        "
        Me.StatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabel})
        Me.StatusStrip.Location = New System.Drawing.Point(0, 431)
        Me.StatusStrip.Name = "StatusStrip"
        Me.StatusStrip.Size = New System.Drawing.Size(632, 22)
        Me.StatusStrip.TabIndex = 7
        Me.StatusStrip.Text = "StatusStrip"
        "
        "PrintToolStripButton
        "
        Me.PrintToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.PrintToolStripButton.Image = CType(resources.GetObject("PrintToolStripButton.Image"), System.Drawing.Image)
        Me.PrintToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.PrintToolStripButton.Name = "PrintToolStripButton"
        Me.PrintToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.PrintToolStripButton.Text = "Print"
        "
        "NewToolStripButton
        "
        Me.NewToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.NewToolStripButton.Image = CType(resources.GetObject("NewToolStripButton.Image"), System.Drawing.Image)
        Me.NewToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.NewToolStripButton.Name = "NewToolStripButton"
        Me.NewToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.NewToolStripButton.Text = "New"
        "
        "ToolStrip
        "
        Me.ToolStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripButton, Me.OpenToolStripButton, Me.SaveToolStripButton, Me.ToolStripSeparator1, Me.PrintToolStripButton, Me.PrintPreviewToolStripButton, Me.ToolStripSeparator2, Me.HelpToolStripButton})
        Me.ToolStrip.Location = New System.Drawing.Point(0, 24)
        Me.ToolStrip.Name = "ToolStrip"
        Me.ToolStrip.Size = New System.Drawing.Size(632, 25)
        Me.ToolStrip.TabIndex = 6
        Me.ToolStrip.Text = "ToolStrip"
        "
        "OpenToolStripButton
        "
        Me.OpenToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.OpenToolStripButton.Image = CType(resources.GetObject("OpenToolStripButton.Image"), System.Drawing.Image)
        Me.OpenToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.OpenToolStripButton.Name = "OpenToolStripButton"
        Me.OpenToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.OpenToolStripButton.Text = "Open"
        "
        "SaveToolStripButton
        "
        Me.SaveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
        "Me.SaveToolStripButton.Image = CType(resources.GetObject("SaveToolStripButton.Image"), System.Drawing.Image)
        Me.SaveToolStripButton.ImageTransparentColor = System.Drawing.Color.Black
        Me.SaveToolStripButton.Name = "SaveToolStripButton"
        Me.SaveToolStripButton.Size = New System.Drawing.Size(23, 22)
        Me.SaveToolStripButton.Text = "Save"
        "
        "ToolStripSeparator1
        "
        Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
        Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
        "
        "PrintPreviewToolStripMenuItem
        "
        "Me.PrintPreviewToolStripMenuItem.Image = CType(resources.GetObject("PrintPreviewToolStripMenuItem.Image"), System.Drawing.Image)
        Me.PrintPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.PrintPreviewToolStripMenuItem.Name = "PrintPreviewToolStripMenuItem"
        Me.PrintPreviewToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.PrintPreviewToolStripMenuItem.Text = "Print Pre&view"
        "
        "PrintToolStripMenuItem
        "
        "Me.PrintToolStripMenuItem.Image = CType(resources.GetObject("PrintToolStripMenuItem.Image"), System.Drawing.Image)
        Me.PrintToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.PrintToolStripMenuItem.Name = "PrintToolStripMenuItem"
        Me.PrintToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.P), System.Windows.Forms.Keys)
        Me.PrintToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.PrintToolStripMenuItem.Text = "&Print"
        "
        "ToolStripSeparator4
        "
        Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
        Me.ToolStripSeparator4.Size = New System.Drawing.Size(169, 6)
        "
        "ExitToolStripMenuItem
        "
        Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem"
        Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.ExitToolStripMenuItem.Text = "E&xit"
        "
        "ToolStripSeparator5
        "
        Me.ToolStripSeparator5.Name = "ToolStripSeparator5"
        Me.ToolStripSeparator5.Size = New System.Drawing.Size(169, 6)
        "
        "PrintSetupToolStripMenuItem
        "
        Me.PrintSetupToolStripMenuItem.Name = "PrintSetupToolStripMenuItem"
        Me.PrintSetupToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.PrintSetupToolStripMenuItem.Text = "Print Setup"
        "
        "SaveAsToolStripMenuItem
        "
        Me.SaveAsToolStripMenuItem.Name = "SaveAsToolStripMenuItem"
        Me.SaveAsToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.SaveAsToolStripMenuItem.Text = "Save &As"
        "
        "NewToolStripMenuItem
        "
        "Me.NewToolStripMenuItem.Image = CType(resources.GetObject("NewToolStripMenuItem.Image"), System.Drawing.Image)
        Me.NewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.NewToolStripMenuItem.Name = "NewToolStripMenuItem"
        Me.NewToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.N), System.Windows.Forms.Keys)
        Me.NewToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.NewToolStripMenuItem.Text = "&New"
        "
        "FileMenu
        "
        Me.FileMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripMenuItem, Me.OpenToolStripMenuItem, Me.ToolStripSeparator3, Me.SaveToolStripMenuItem, Me.SaveAsToolStripMenuItem, Me.ToolStripSeparator4, Me.PrintToolStripMenuItem, Me.PrintPreviewToolStripMenuItem, Me.PrintSetupToolStripMenuItem, Me.ToolStripSeparator5, Me.ExitToolStripMenuItem})
        Me.FileMenu.ImageTransparentColor = System.Drawing.SystemColors.ActiveBorder
        Me.FileMenu.Name = "FileMenu"
        Me.FileMenu.Size = New System.Drawing.Size(44, 20)
        Me.FileMenu.Text = "&File"
        "
        "OpenToolStripMenuItem
        "
        "Me.OpenToolStripMenuItem.Image = CType(resources.GetObject("OpenToolStripMenuItem.Image"), System.Drawing.Image)
        Me.OpenToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.OpenToolStripMenuItem.Name = "OpenToolStripMenuItem"
        Me.OpenToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.O), System.Windows.Forms.Keys)
        Me.OpenToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.OpenToolStripMenuItem.Text = "&Open"
        "
        "ToolStripSeparator3
        "
        Me.ToolStripSeparator3.Name = "ToolStripSeparator3"
        Me.ToolStripSeparator3.Size = New System.Drawing.Size(169, 6)
        "
        "SaveToolStripMenuItem
        "
        "Me.SaveToolStripMenuItem.Image = CType(resources.GetObject("SaveToolStripMenuItem.Image"), System.Drawing.Image)
        Me.SaveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem"
        Me.SaveToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.S), System.Windows.Forms.Keys)
        Me.SaveToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
        Me.SaveToolStripMenuItem.Text = "&Save"
        "
        "MenuStrip
        "
        Me.MenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FileMenu, Me.EditMenu, Me.ViewMenu, Me.ToolsMenu, Me.WindowsMenu, Me.HelpMenu})
        Me.MenuStrip.Location = New System.Drawing.Point(0, 0)
        Me.MenuStrip.MdiWindowListItem = Me.WindowsMenu
        Me.MenuStrip.Name = "MenuStrip"
        Me.MenuStrip.Size = New System.Drawing.Size(632, 24)
        Me.MenuStrip.TabIndex = 5
        Me.MenuStrip.Text = "MenuStrip"
        "
        "EditMenu
        "
        Me.EditMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UndoToolStripMenuItem, Me.RedoToolStripMenuItem, Me.ToolStripSeparator6, Me.CutToolStripMenuItem, Me.CopyToolStripMenuItem, Me.PasteToolStripMenuItem, Me.ToolStripSeparator7, Me.SelectAllToolStripMenuItem})
        Me.EditMenu.Name = "EditMenu"
        Me.EditMenu.Size = New System.Drawing.Size(44, 20)
        Me.EditMenu.Text = "&Edit"
        "
        "UndoToolStripMenuItem
        "
        "Me.UndoToolStripMenuItem.Image = CType(resources.GetObject("UndoToolStripMenuItem.Image"), System.Drawing.Image)
        Me.UndoToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.UndoToolStripMenuItem.Name = "UndoToolStripMenuItem"
        Me.UndoToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Z), System.Windows.Forms.Keys)
        Me.UndoToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.UndoToolStripMenuItem.Text = "&Undo"
        "
        "RedoToolStripMenuItem
        "
        "Me.RedoToolStripMenuItem.Image = CType(resources.GetObject("RedoToolStripMenuItem.Image"), System.Drawing.Image)
        Me.RedoToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.RedoToolStripMenuItem.Name = "RedoToolStripMenuItem"
        Me.RedoToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Y), System.Windows.Forms.Keys)
        Me.RedoToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.RedoToolStripMenuItem.Text = "&Redo"
        "
        "ToolStripSeparator6
        "
        Me.ToolStripSeparator6.Name = "ToolStripSeparator6"
        Me.ToolStripSeparator6.Size = New System.Drawing.Size(191, 6)
        "
        "CutToolStripMenuItem
        "
        "Me.CutToolStripMenuItem.Image = CType(resources.GetObject("CutToolStripMenuItem.Image"), System.Drawing.Image)
        Me.CutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.CutToolStripMenuItem.Name = "CutToolStripMenuItem"
        Me.CutToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.X), System.Windows.Forms.Keys)
        Me.CutToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.CutToolStripMenuItem.Text = "Cu&t"
        "
        "CopyToolStripMenuItem
        "
        "Me.CopyToolStripMenuItem.Image = CType(resources.GetObject("CopyToolStripMenuItem.Image"), System.Drawing.Image)
        Me.CopyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.CopyToolStripMenuItem.Name = "CopyToolStripMenuItem"
        Me.CopyToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C), System.Windows.Forms.Keys)
        Me.CopyToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.CopyToolStripMenuItem.Text = "&Copy"
        "
        "PasteToolStripMenuItem
        "
        "Me.PasteToolStripMenuItem.Image = CType(resources.GetObject("PasteToolStripMenuItem.Image"), System.Drawing.Image)
        Me.PasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black
        Me.PasteToolStripMenuItem.Name = "PasteToolStripMenuItem"
        Me.PasteToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.V), System.Windows.Forms.Keys)
        Me.PasteToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.PasteToolStripMenuItem.Text = "&Paste"
        "
        "ToolStripSeparator7
        "
        Me.ToolStripSeparator7.Name = "ToolStripSeparator7"
        Me.ToolStripSeparator7.Size = New System.Drawing.Size(191, 6)
        "
        "SelectAllToolStripMenuItem
        "
        Me.SelectAllToolStripMenuItem.Name = "SelectAllToolStripMenuItem"
        Me.SelectAllToolStripMenuItem.ShortcutKeys = CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A), System.Windows.Forms.Keys)
        Me.SelectAllToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.SelectAllToolStripMenuItem.Text = "Select &All"
        "
        "ViewMenu
        "
        Me.ViewMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolBarToolStripMenuItem, Me.StatusBarToolStripMenuItem})
        Me.ViewMenu.Name = "ViewMenu"
        Me.ViewMenu.Size = New System.Drawing.Size(52, 20)
        Me.ViewMenu.Text = "&View"
        "
        "ToolBarToolStripMenuItem
        "
        Me.ToolBarToolStripMenuItem.Checked = True
        Me.ToolBarToolStripMenuItem.CheckOnClick = True
        Me.ToolBarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked
        Me.ToolBarToolStripMenuItem.Name = "ToolBarToolStripMenuItem"
        Me.ToolBarToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
        Me.ToolBarToolStripMenuItem.Text = "&Toolbar"
        "
        "StatusBarToolStripMenuItem
        "
        Me.StatusBarToolStripMenuItem.Checked = True
        Me.StatusBarToolStripMenuItem.CheckOnClick = True
        Me.StatusBarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked
        Me.StatusBarToolStripMenuItem.Name = "StatusBarToolStripMenuItem"
        Me.StatusBarToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
        Me.StatusBarToolStripMenuItem.Text = "&Status Bar"
        "
        "ToolsMenu
        "
        Me.ToolsMenu.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OptionsToolStripMenuItem})
        Me.ToolsMenu.Name = "ToolsMenu"
        Me.ToolsMenu.Size = New System.Drawing.Size(54, 20)
        Me.ToolsMenu.Text = "&Tools"
        "
        "MaximizeAllToolStripMenuItem
        "
        Me.MaximizeAllToolStripMenuItem.Name = "MaximizeAllToolStripMenuItem"
        Me.MaximizeAllToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.MaximizeAllToolStripMenuItem.Text = "Ma&ximize All"
        "
        "MinimizeAllToolStripMenuItem
        "
        Me.MinimizeAllToolStripMenuItem.Name = "MinimizeAllToolStripMenuItem"
        Me.MinimizeAllToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.MinimizeAllToolStripMenuItem.Text = "&Minimize All"
        "
        "RestoreAllToolStripMenuItem
        "
        Me.RestoreAllToolStripMenuItem.Name = "RestoreAllToolStripMenuItem"
        Me.RestoreAllToolStripMenuItem.Size = New System.Drawing.Size(179, 22)
        Me.RestoreAllToolStripMenuItem.Text = "&Restore All"
        "
        "MDIParent1
        "
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(632, 453)
        Me.Controls.Add(Me.ToolStrip)
        Me.Controls.Add(Me.MenuStrip)
        Me.Controls.Add(Me.StatusStrip)
        Me.IsMdiContainer = True
        Me.MainMenuStrip = Me.MenuStrip
        Me.Name = "MDIParent1"
        Me.Text = "MDIParent1"
        Me.StatusStrip.ResumeLayout(False)
        Me.StatusStrip.PerformLayout()
        Me.ToolStrip.ResumeLayout(False)
        Me.ToolStrip.PerformLayout()
        Me.MenuStrip.ResumeLayout(False)
        Me.MenuStrip.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()
    End Sub
    Friend WithEvents ContentsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents HelpMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents IndexToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents SearchToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator8 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents AboutToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ArrangeIconsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents CloseAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents NewWindowToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents WindowsMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents CascadeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents TileVerticalToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents TileHorizontalToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents OptionsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents HelpToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents ToolStripSeparator2 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents PrintPreviewToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents ToolTip As System.Windows.Forms.ToolTip
    Friend WithEvents ToolStripStatusLabel As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents StatusStrip As System.Windows.Forms.StatusStrip
    Friend WithEvents PrintToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents NewToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents ToolStrip As System.Windows.Forms.ToolStrip
    Friend WithEvents OpenToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents SaveToolStripButton As System.Windows.Forms.ToolStripButton
    Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents PrintPreviewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents PrintToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator4 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents ExitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator5 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents PrintSetupToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents SaveAsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents NewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents FileMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents OpenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents SaveToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents MenuStrip As System.Windows.Forms.MenuStrip
    Friend WithEvents EditMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents UndoToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents RedoToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator6 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents CutToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents CopyToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents PasteToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator7 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents SelectAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ViewMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolBarToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents StatusBarToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolsMenu As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents MinimizeAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents MaximizeAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents RestoreAllToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
End Class

<Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()> _
Partial Public Class Form1
    Inherits System.Windows.Forms.Form
    "Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.IContainer
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.txtContents = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        "
        "txtContents
        "
        Me.txtContents.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtContents.Location = New System.Drawing.Point(0, 0)
        Me.txtContents.Multiline = True
        Me.txtContents.Name = "txtContents"
        Me.txtContents.Size = New System.Drawing.Size(292, 273)
        Me.txtContents.TabIndex = 6
        "
        "Form1
        "
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(292, 273)
        Me.Controls.Add(Me.txtContents)
        Me.Name = "Form1"
        Me.Text = "Child Title"
        Me.ResumeLayout(False)
        Me.PerformLayout()
    End Sub
    Friend WithEvents txtContents As System.Windows.Forms.TextBox
End Class


Set Form State: MdiParent and IsMdiContainer

Imports System
Imports System.Windows.Forms

Public Class MainClass
    Public Shared Main1 As New Form1()
    Public Shared Main2 As New Form1()
    Public Shared Child As New Form2()
    
    Shared Sub Main()
        Main1.Text = "Parent 2"
        Main2.Text = "Parent 1"
        Main1.Show()
        Main2.Show()
        Child.MdiParent = Main2
        Child.Show()
        Application.Run()

    End Sub
End Class

Public Class Form1
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents MdiClient1 As System.Windows.Forms.MdiClient
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.Container
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.MdiClient1 = New System.Windows.Forms.MdiClient()
        Me.SuspendLayout()
        "
        "MdiClient1
        "
        Me.MdiClient1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.MdiClient1.Name = "MdiClient1"
        Me.MdiClient1.TabIndex = 0
        "
        "Form1
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(384, 317)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.MdiClient1})
        Me.IsMdiContainer = True
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)
    End Sub
#End Region

    Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ruponentModel.CancelEventArgs) Handles MyBase.Closing
        Application.Exit()
    End Sub
End Class

Public Class Form2
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.Container
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    Friend WithEvents Button3 As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Button1 = New System.Windows.Forms.Button()
        Me.Button2 = New System.Windows.Forms.Button()
        Me.Button3 = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        "
        "Button1
        "
        Me.Button1.Location = New System.Drawing.Point(12, 20)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(88, 32)
        Me.Button1.TabIndex = 0
        Me.Button1.Text = "Become Parent"
        "
        "Button2
        "
        Me.Button2.Location = New System.Drawing.Point(12, 64)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(88, 32)
        Me.Button2.TabIndex = 1
        Me.Button2.Text = "Become Child of Parent1"
        "
        "Button3
        "
        Me.Button3.Location = New System.Drawing.Point(120, 64)
        Me.Button3.Name = "Button3"
        Me.Button3.Size = New System.Drawing.Size(88, 32)
        Me.Button3.TabIndex = 2
        Me.Button3.Text = "Become Child of Parent2"
        "
        "Form2
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)
        Me.ClientSize = New System.Drawing.Size(260, 129)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1})
        Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Name = "Form2"
        Me.Text = "Child"
        Me.ResumeLayout(False)
    End Sub
#End Region
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Hide()
        Me.MdiParent = Nothing
        Me.IsMdiContainer = True
        Me.Show()
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Hide()
        Me.IsMdiContainer = False
        Me.MdiParent = MainClass.Main2
        Me.Show()
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Hide()
        Me.IsMdiContainer = False
        Me.MdiParent = MainClass.Main1
        Me.Show()
    End Sub
End Class


The use of MDI parent and child windows

Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
Public Class MainClass
   Shared Sub Main()
        Dim myform As Form = New FrmUsingMDI()
        Application.Run(myform)
   End Sub " Main
End Class

Public Class FrmUsingMDI
   Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
   Public Sub New()
      MyBase.New()
      "This call is required by the Windows Form Designer.
      InitializeComponent()
      "Add any initialization after the InitializeComponent() call
   End Sub
   "Form overrides dispose to clean up the component list.
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
      If disposing Then
         If Not (components Is Nothing) Then
            components.Dispose()
         End If
      End If
      MyBase.Dispose(disposing)
   End Sub
   " main menu containing menu items File and Window
   Friend WithEvents mnuMain As MainMenu
   " menu containing submenu New and menu item Exit
   Friend WithEvents mnuitmFile As MenuItem
   Friend WithEvents mnuitmExit As MenuItem
   " submenu New
   Friend WithEvents mnuitmNew As MenuItem
   Friend WithEvents mnuitmChild1 As MenuItem
   Friend WithEvents mnuitmChild2 As MenuItem
   Friend WithEvents mnuitmChild3 As MenuItem
   " menu containing menu items Cascade, TileHorizontal and 
   " TileVertical
   Friend WithEvents mnuitmWindow As MenuItem
   Friend WithEvents mnuitmCascade As MenuItem
   Friend WithEvents mnuitmTileHorizontal As MenuItem
   Friend WithEvents mnuitmTileVertical As MenuItem
   "Required by the Windows Form Designer
   Private components As System.ruponentModel.Container
   "NOTE: The following procedure is required by the Windows Form Designer
   "It can be modified using the Windows Form Designer.  
   "Do not modify it using the code editor.
   <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
      Me.mnuitmTileHorizontal = New System.Windows.Forms.MenuItem()
      Me.mnuitmTileVertical = New System.Windows.Forms.MenuItem()
      Me.mnuitmChild1 = New System.Windows.Forms.MenuItem()
      Me.mnuitmCascade = New System.Windows.Forms.MenuItem()
      Me.mnuitmChild2 = New System.Windows.Forms.MenuItem()
      Me.mnuMain = New System.Windows.Forms.MainMenu()
      Me.mnuitmFile = New System.Windows.Forms.MenuItem()
      Me.mnuitmNew = New System.Windows.Forms.MenuItem()
      Me.mnuitmChild3 = New System.Windows.Forms.MenuItem()
      Me.mnuitmExit = New System.Windows.Forms.MenuItem()
      Me.mnuitmWindow = New System.Windows.Forms.MenuItem()
      "
      "mnuitmTileHorizontal
      "
      Me.mnuitmTileHorizontal.Index = 1
      Me.mnuitmTileHorizontal.Text = "Tile Horizontal"
      "
      "mnuitmTileVertical
      "
      Me.mnuitmTileVertical.Index = 2
      Me.mnuitmTileVertical.Text = "Tile Vertical"
      "
      "mnuitmChild1
      "
      Me.mnuitmChild1.Index = 0
      Me.mnuitmChild1.Text = "Child1"
      "
      "mnuitmCascade
      "
      Me.mnuitmCascade.Index = 0
      Me.mnuitmCascade.Text = "Cascade"
      "
      "mnuitmChild2
      "
      Me.mnuitmChild2.Index = 1
      Me.mnuitmChild2.Text = "Child2"
      "
      "mnuMain
      "
      Me.mnuMain.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuitmFile, Me.mnuitmWindow})
      "
      "mnuitmFile
      "
      Me.mnuitmFile.Index = 0
      Me.mnuitmFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuitmNew, Me.mnuitmExit})
      Me.mnuitmFile.Text = "File"
      "
      "mnuitmNew
      "
      Me.mnuitmNew.Index = 0
      Me.mnuitmNew.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuitmChild1, Me.mnuitmChild2, Me.mnuitmChild3})
      Me.mnuitmNew.Text = "New"
      "
      "mnuitmChild3
      "
      Me.mnuitmChild3.Index = 2
      Me.mnuitmChild3.Text = "Child3"
      "
      "mnuitmExit
      "
      Me.mnuitmExit.Index = 1
      Me.mnuitmExit.Text = "Exit"
      "
      "mnuitmWindow
      "
      Me.mnuitmWindow.Index = 1
      Me.mnuitmWindow.MdiList = True
      Me.mnuitmWindow.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuitmCascade, Me.mnuitmTileHorizontal, Me.mnuitmTileVertical})
      Me.mnuitmWindow.Text = "Window"
      "
      "FrmUsingMDI
      "
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
      Me.ClientSize = New System.Drawing.Size(360, 301)
      Me.IsMdiContainer = True
      Me.Menu = Me.mnuMain
      Me.Name = "FrmUsingMDI"
      Me.Text = "UsingMDI"
   End Sub
#End Region
   Private childWindow As FrmChild
   " create FrmChild1 when menu clicked
   Private Sub mnuitmChild1_Click( _
      ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmChild1.Click
      " create image path
      Dim imagePath As String = "figure2.bmp"
      " create new child
      childWindow = New FrmChild(imagePath, "Child1")
      childWindow.MdiParent = Me  " set parent
      childWindow.Show()          " display child
   End Sub " mnuitmChild1_Click
   " create FrmChild2 when menu clicked
   Private Sub mnuitmChild2_Click( _
      ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmChild2.Click
      " create image path
      Dim imagePath As String = "figure2.bmp"
      " create new child
      childWindow = New FrmChild(imagePath, "Child2")
      childWindow.MdiParent = Me  " set parent
      childWindow.Show()          " display child
   End Sub " mnuitmChild2_Click
   " create FrmChild3 when menu clicked
   Private Sub mnuitmChild3_Click( _
      ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmChild3.Click
      " create image path
      Dim imagePath As String = "figure2.bmp"
      " create new child
      childWindow = New FrmChild(imagePath, "Child3")
      childWindow.MdiParent = Me  " set parent
      childWindow.Show()          " display child
   End Sub " mnuitmChild3_Click
   Private Sub mnuitmExit_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmExit.Click
      Application.Exit()
   End Sub " mnuitmExit_Click
   Private Sub mnuitmCascade_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmCascade.Click
      Me.LayoutMdi(MdiLayout.Cascade)
   End Sub " mnuitmCascade_Click
   Private Sub mnuitmTileHorizontal_Click _
      (ByVal sender As System.Object, ByVal e As System.EventArgs) _
      Handles mnuitmTileHorizontal.Click
      Me.LayoutMdi(MdiLayout.TileHorizontal)
   End Sub " mnuitmTileHorizontal_Click
   Private Sub mnuitmTileVertical_Click _
      (ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles mnuitmTileVertical.Click
      Me.LayoutMdi(MdiLayout.TileVertical)
   End Sub
End Class
Public Class FrmChild
   Inherits Form
#Region " Windows Form Designer generated code "
   Public Sub New()
      MyBase.New()
      "This call is required by the Windows Form Designer.
      InitializeComponent()
      "Add any initialization after the InitializeComponent() call
   End Sub
   "   Public Sub New(ByVal imageInformation As String, ByVal windowName As String)
   "      Display(imageInformation, windowName)
   "   End Sub
   "Form overrides dispose to clean up the component list.
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
      If disposing Then
         If Not (components Is Nothing) Then
            components.Dispose()
         End If
      End If
      MyBase.Dispose(disposing)
   End Sub
   " contains an image loaded from disk
   Friend WithEvents picDisplay As PictureBox
   "Required by the Windows Form Designer
   Private components As System.ruponentModel.Container
   "NOTE: The following procedure is required by the Windows Form Designer
   "It can be modified using the Windows Form Designer.  
   "Do not modify it using the code editor.
   <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
      Me.picDisplay = New System.Windows.Forms.PictureBox()
      Me.SuspendLayout()
      "
      "picDisplay
      "
      Me.picDisplay.Location = New System.Drawing.Point(8, 8)
      Me.picDisplay.Name = "picDisplay"
      Me.picDisplay.Size = New System.Drawing.Size(256, 208)
      Me.picDisplay.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
      Me.picDisplay.TabIndex = 0
      Me.picDisplay.TabStop = False
      "
      "FrmChild1
      "
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
      Me.ClientSize = New System.Drawing.Size(272, 221)
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.picDisplay})
      Me.Name = "FrmChild"
      Me.Text = ""
      Me.ResumeLayout(False)
   End Sub
#End Region
   " constructor
   Public Sub New(ByVal picture As String, ByVal name As String)
      " call Visual Studio generated default constructor
      Me.New()
      " set title
      Me.Text = name
      " set image for picture box
      picDisplay.Image = Image.FromFile(picture)
   End Sub  " New
End Class


Use Menu to manage MDI Children Window

Imports System
Imports System.Collections
Imports System.Data
Imports System.IO
Imports System.Xml.Serialization
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Printing

Public Class MainClass
    Shared Sub Main()
       Dim form1 As Form = New Form1()
       Application.Run(form1) 
     End Sub
End Class




Public Class Form1
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        "This call is required by the Windows Form Designer.
        InitializeComponent()
        "Add any initialization after the InitializeComponent() call
    End Sub
    "Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents mnuExit As System.Windows.Forms.MenuItem
    Friend WithEvents mnuFile As System.Windows.Forms.MenuItem
    Friend WithEvents mnuNew As System.Windows.Forms.MenuItem
    "Required by the Windows Form Designer
    Private components As System.ruponentModel.Container
    "NOTE: The following procedure is required by the Windows Form Designer
    "It can be modified using the Windows Form Designer.  
    "Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.MainMenu1 = New System.Windows.Forms.MainMenu()
        Me.mnuFile = New System.Windows.Forms.MenuItem()
        Me.mnuNew = New System.Windows.Forms.MenuItem()
        Me.mnuExit = New System.Windows.Forms.MenuItem()
        "
        "MainMenu1
        "
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile})
        "
        "mnuFile
        "
        Me.mnuFile.Index = 0
        Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuNew, Me.mnuExit})
        Me.mnuFile.Text = "File"
        "
        "mnuNew
        "
        Me.mnuNew.Index = 0
        Me.mnuNew.Text = "New"
        "
        "mnuExit
        "
        Me.mnuExit.Index = 1
        Me.mnuExit.Text = "Exit"
        "
        "Form1
        "
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
        Me.ClientSize = New System.Drawing.Size(292, 272)
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.Text = "MDI Example 2"
    End Sub
#End Region
    Private Sub Form1_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) _
  Handles MyBase.Load
        Me.Text = "I"m an MDI Parent"
        Me.IsMdiContainer = True
        Dim MyChild As New System.Windows.Forms.Form()
        MyChild.MdiParent = Me
        MyChild.Show()
        MyChild.Text = "First MDI Child"
        InitializeMenu()
    End Sub
    Public Sub InitializeMenu()
        Dim mnuWindow As New MenuItem("&Window")
        MainMenu1.MenuItems.Add(mnuWindow)
        mnuWindow.MenuItems.Add(New MenuItem("&Cascade", AddressOf WindowCascade_Clicked))
        mnuWindow.MenuItems.Add(New MenuItem("Tile &Horizontal", AddressOf WindowTileHoriz_Clicked))
        mnuWindow.MenuItems.Add(New MenuItem("Tile &Vertical", AddressOf WindowTileVert_Clicked))
        mnuWindow.MdiList = True
    End Sub
    Protected Sub WindowCascade_Clicked(ByVal Sender As Object, _
      ByVal e As System.EventArgs)
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub
    Protected Sub WindowTileHoriz_Clicked(ByVal Sender As Object, _
      ByVal e As System.EventArgs)
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub
    Protected Sub WindowTileVert_Clicked(ByVal Sender As Object, _
      ByVal e As System.EventArgs)
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub
    Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click
        System.Environment.Exit(0)
    End Sub
    
    Private Sub mnuNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuNew.Click
        Static numOfChildren As Integer = 2
        Dim MyChild As New System.Windows.Forms.Form()
        MyChild.MdiParent = Me
        MyChild.Show()
        MyChild.Text = "MDI Child " & CStr(numOfChildren)
        numOfChildren += 1
    End Sub
End Class