procedure TDforFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if (ModalResult = mrOK) or (ModalResult = mrCancel) then
CanClose := False;
end;
begin
if (ModalResult = mrOK) or (ModalResult = mrCancel) then
CanClose := False;
end;
在其点OK或Cancle时写事件
再一次生成此对话框!
tempfrm := tfrmUserLogin.Create(nil);
try
if (tempfrm.ShowModal) = mrcancel then
application.Terminate;
finally
tempfrm.free;
end;