rbWiki > Output > Printer > Detecting Whether PrintDialog Cancel

Detecting Whether PrintDialog Cancel

TECH TIP: Detecting Whether PrintDialog's Cancel Button Was Selected

When the print dialog is displayed to the user, you can determine whether the Cancel button was selected by using the  Report.OnPrintDialogClose event.

Example:

procedure TForm1.ppReport1PrintDialogClose(Sender: TObject);
begin

  if ppReport1.PrintDialog.ModalResult = mrCancel then
    ShowMessage('Use chose to cancel the print request');

end;

  

Tags
none

Files (0)

 
You must login to post a comment.