Form1中加Panel1,Panel1的属性DockSite设为True,
Form2的属性DragKind设为dkDock, DragMode设为dmAuromatic
在Form1的OnShow中加:
Form2:= TForm2.Create(self);
Form2.ManualDock(Panel1, nil, alclient);
form2.FormStyle:=fsStayOnTop;
Form2.Show;
如果是pagecontrol
Form2.ManualDock(pagecontrol1, nil, alclient);