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;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/5518877.html