procedure TChildForm.CreateParams(var Params:TCreateParams);
//让拥有者成为父
begin
inherited CreateParams(Params);
if Owner is TForm then
Params.WndParent:=TForm(Owner).Handle;
end;
procedure TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);
//关闭释放
begin
Action:=caFree;
end;