firemonkey打开子窗体

procedure TForm1.Button1Click(Sender: TObject);
var
ChildForm: TForm2;
begin
ChildForm := TForm2.Create(nil);
ChildForm.ShowModal(
procedure(ModalResult: TModalResult)
begin
if ModalResult = mrOK then
begin
// 要做的动作
end;
end);
end;

子窗体如何释放

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := TCloseAction.caFree;
end;

http://www.cnblogs.com/hnxxcxg/p/5518877.html

原文地址:https://www.cnblogs.com/findumars/p/5011444.html