Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
VB.Net: MDI
From Wiki
you can make any form and mdichild of another.
Just create a form form1 with a button on it and a form named form2.
Then put this in the form1 click event.
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Me.IsMdiContainer = True
- Dim _frm1 As New Form2
- _frm1.MdiParent = Me
- _frm1.Show()
- Dim _frm2 As New Form2
- _frm2.MdiParent = Me
- _frm2.Show()
- Dim _frm3 As New Form2
- _frm3.MdiParent = Me
- _frm3.Show()
- End Sub
- End Class
Important bits are the me.IsMDiContainer which makes Form1 the parent form for the mdichildren.
and then the .MdiParent of all the mdiChildren to the form1. Look how the MDIChildren are below the other controls but in general you would not put controls on the mdiparent/container.




LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.