Public Class frmMain
Public f1 As Form1
Public f2 As Form2
Public f3 As form3
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
f1 = New Form1
f1.BackColor = Color.LightBlue
f1.TopLevel = False
f1.FormBorderStyle = Windows.Forms.FormBorderStyle.None
f1.StartPosition = FormStartPosition.CenterParent
f1.WindowState = FormWindowState.Maximized
Me.Controls.Add(f1)
f1.Show()
f2 = New Form2
f2.BackColor = Color.Red
f2.TopLevel = False
f2.FormBorderStyle = Windows.Forms.FormBorderStyle.None
f2.StartPosition = FormStartPosition.CenterParent
f2.WindowState = FormWindowState.Maximized
Me.Controls.Add(f2)
f2.Show()
f3 = New Form3
f3.BackColor = Color.Green
f3.TopLevel = False
f3.FormBorderStyle = Windows.Forms.FormBorderStyle.None
f3.StartPosition = FormStartPosition.CenterParent
f3.WindowState = FormWindowState.Maximized
Me.Controls.Add(f3)
f3.show()
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
f1.Size = Me.Size
f2.Size = Me.Size
f3.Size = Me.Size
End Sub
End Class