Cancelling Printing with the Print Dialog
How do I know if the printing has been cancelled by clicking the Cancel
button on the Print Dialog?
I wish to avoid executing code in the OnPrintDialogClose event if the
Cancel button has been clicked.
--- posted by geoForum on http://delphi.newswhat.com
button on the Print Dialog?
I wish to avoid executing code in the OnPrintDialogClose event if the
Cancel button has been clicked.
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
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;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com