It takes only two steps to turn a form or control into a dock:
(1) set the DragKind feature to dkDock.
(2) set the DragMode feature to dmAutomatic.
In addition, the TPanel control has a UseDockManager feature. If it is set to true, it expands the size of the preceding control to the size of the Panel, which is filled with all the Panel space.
DEMO code:
Create a VCL form project and add the interface code:
Object Form1: TForm1
Left = 0
Top = 0
Caption = #25511 #20214 #20572 #38752 ''#29482 #24735 #33021
ClientHeight = 1, 293
ClientWidth = 347
Color = clBtnFace
DockSite = True
Font. Charset = DEFAULT_CHARSET
Font. Color = clWindowText
Font. Height =-11
Font. Name = 'tahoma'
Font. Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
Object shape1: tshape
Left = 1, 208
Top = 48
Width = 105
Height = 97
Dragkind = dkdock
Dragmode = dmautomatic
End
Object shape2: tshape
Left = 1, 208
Maximum = 160
Width = 121
Height = 41
Dragkind = dkdock
Dragmode = dmautomatic
End
Object Panel1: tpanel
Left = 25
Top = 24
Width = 161
Height = 225
Caption = 'panel1'
DockSite = True
TabOrder = 0
End
End