O oldppp Unregistered / Unconfirmed GUEST, unregistred user! 2001-07-06 #1 可能题目说不清楚. 就是说在form的onClose事件中有一个选择,按确认后该form关闭,否则回到原来 窗口.
M myevin Unregistered / Unconfirmed GUEST, unregistred user! 2001-07-06 #3 判断是要在CloseQuery内判断,源码如下: procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin if Application.MessageBox(PChar('是否关闭窗体?'), PChar('询问'), MB_ICONQUESTION or MB_OKCancel) = Id_Ok then CanClose := True else CanClose := False; end;
判断是要在CloseQuery内判断,源码如下: procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin if Application.MessageBox(PChar('是否关闭窗体?'), PChar('询问'), MB_ICONQUESTION or MB_OKCancel) = Id_Ok then CanClose := True else CanClose := False; end;