procedure TForm1.Button1Click(Sender : TObject);
begin
Application.CreateForm(TForm2, Form2);
Form2.Show;
end;
uses Form1;
procedure TForm2.FormCreate(Sender : TObject)
begin
with Self do
begin
Parent := Form1.Panel1;
Top := 0;
Left := 0;
Height := Form1.Panel1.ClientHieght;
Width := Form1.Panel1.ClientWidth;
end;
end;