G
Guest
I am using a PrintPreviewDialog to show a document. Via the BeginPrint
event, I open a PrintDialog to let the user choose what pages (and other
settings) to print. However, I can't find a way to allow the user to cancel
the print command if the 'Cancel' button is pressed from the PrintDialog.
I tried throwing an exception, but it is only caught when I run in debug
mode (bug in C#?). i.e. If I 'Start without debugging', then the exception I
throw is not caught. But if I 'Start with debugging', even without stepping
through the code, the exception is caught.
Anyway, any suggestions on cancelling a print job once the
PrintDocument.Print command is started?
Thanks,
--Michael
event, I open a PrintDialog to let the user choose what pages (and other
settings) to print. However, I can't find a way to allow the user to cancel
the print command if the 'Cancel' button is pressed from the PrintDialog.
I tried throwing an exception, but it is only caught when I run in debug
mode (bug in C#?). i.e. If I 'Start without debugging', then the exception I
throw is not caught. But if I 'Start with debugging', even without stepping
through the code, the exception is caught.
Anyway, any suggestions on cancelling a print job once the
PrintDocument.Print command is started?
Thanks,
--Michael