
Creating Windows Forms • Chapter 7 299
Dim frmNewMDIChild As New Form2()
frmNewMDIChild.MDIParent = Me
frmNewMDIChild.Show()
End Sub
The user can now click the button on the MDI parent form to
create new child forms.As child forms are created, your task as the
developer becomes to manage them. Fortunately, the Windows Forms
framework exposes properties and methods to make that an easy task.
Determining the Active MDI Child Form
In an MDI application, the active child form is the child form that has the focus
or was most recently active.At times, you will need to identify the active child
form. For example, suppose you have a Close menu item in the File ...