与 与你同行 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-07 #1 请问如何在按窗体自带关闭窗口时让用户做出选择,如在onclose事件中出现一个对话框,选择“是”则退出, 但选择“否”如何让窗口不关闭,主要是让窗口不关闭!谢谢!
L lcl_003 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-07 #2 if(application.MessageBox('是否确认关闭窗口?','确认关闭' mb_yesno+mb_iconquestion)<>idno) then begin end;
死 死水 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-07 #3 procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin if MessageDlg('你要关闭窗体吗?', mtInformation,[mbYes,mbNo],0)=mryes then action:=caFree else action:=caNone; end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin if MessageDlg('你要关闭窗体吗?', mtInformation,[mbYes,mbNo],0)=mryes then action:=caFree else action:=caNone; end;
D dhycq Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-07 #4 if(application.MessageBox('是否要关闭该窗口?','请确认,mb_yesno or mb_iconquestion)<>idno) then begin action:=cafree; end else action:=canone;
if(application.MessageBox('是否要关闭该窗口?','请确认,mb_yesno or mb_iconquestion)<>idno) then begin action:=cafree; end else action:=canone;
行 行素 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-07 #7 to:lch_003 你的好象不行哎~ 同意死水。。。。。。。