Tuesday, December 11, 2007

How to create MDI Child

How to create MDI Child

Step 1

To create an MDI child, go to the File and select New click event and then declare the following codes.


It is actually the same as creating and show a normal form except the form MdiParemt properties is set to it’s parent.

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click

Dim f2 As New Form2()

f2.MdiParent = Me

f2.Show()

End Sub

An example of the MDI application that we have created are shown below

No comments: