子窗口最大化不就完了?!
如果不是最大化,可以这样:
Dim f2 As New Form2()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
f2.MdiParent = Me
f2.Show()
End Sub Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Not (f2 Is Nothing) Then
If f2.WindowState = FormWindowState.Normal Then
Debug.Assert(Me.ClientRectangle.Width = Me.ClientSize.Width)
Debug.Assert(Me.ClientRectangle.Height = Me.ClientSize.Height)
f2.SetBounds(0, 0, Me.ClientSize.Width - 4, Me.ClientSize.Height - 4) End If
End If
End Sub

解决方案 »

  1.   

    thanks
    虽然我用硬编码的调整了一下,在我的窗体下由于有menu,toolbar,以及statusbar,所以最终
    f2.SetBounds(0,0,this.ClientSize.Width - 6,this.ClientSize.Height - 74);
    如果能够动态得出真实的客户区size更好,仍旧感谢。给分
      

  2.   

    更加简单的办法:
    Dim f2 As New Form2()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    f2.MdiParent = Me
    f2.Show()
    f2.Dock = DockStyle.Fill
    End Sub Private Sub Form1_Resize
      

  3.   

    Form1_Resize 事件就不用执行了。
      

  4.   

    CSDN的帖子真有意思,结贴了还可以添加帖子?:)