home *** CD-ROM | disk | FTP | other *** search
/ Delphi 4 Bible / Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso / source / Misc / CloseQuery.pas next >
Pascal/Delphi Source File  |  1998-04-04  |  231b  |  9 lines

  1. procedure TForm1.FormCloseQuery(Sender: TObject; 
  2.   var CanClose: Boolean);
  3. begin
  4.   if MessageDlg('End the program?',
  5.     mtConfirmation, [mbYes, mbNo], 0) = mrYes
  6.     then CanClose := True
  7.     else CanClose := False;
  8. end;
  9.