#1
|
|||
|
|||
Say no to program closings!
Here's how to prompt users whether they really want to exit your program or not (regardless of how they choose to close it):
procedure TForm1.FormCloseQuery( Sender: TObject; var CanClose: Boolean); begin if(mrNo = MessageDlg( 'Are you sure you want to exit?', mtInformation, [mbYes, mbNo], 0)) then begin CanClose := False; end; end; |