Quote Originally Posted by .paul. View Post
You can use a TableLayoutPanel. That will allow docking, handle resizing, and allow a fixed 22px gap at the bottom of the form...

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim tlp As New TableLayoutPanel
        tlp.RowCount = 2
        tlp.ColumnCount = 1
        tlp.Dock = DockStyle.Fill
        Me.Controls.Add(tlp)
        Dim tb As New TextBox With {.Dock = DockStyle.Fill, .Multiline = True, .BackColor = Color.Red}
        tlp.Controls.Add(tb)
        Dim p As New Panel With {.Dock = DockStyle.Fill}
        tlp.Controls.Add(p)
        tlp.RowStyles.Add(New RowStyle(SizeType.Percent, 100))
        tlp.RowStyles.Add(New RowStyle(SizeType.Absolute, 22))
        tlp.SetColumn(tb, 0)
        tlp.SetRow(tb, 0)
        tlp.SetColumn(p, 0)
        tlp.SetRow(p, 1)
    End Sub

End Class
That's certainly not wrong but it seems a bit of overkill to use a TableLayoutPanel for one control when you could achieve the same effect simply by setting properties of that control.