Link to home
Start Free TrialLog in
Avatar of FrancineTaylor
FrancineTaylor

asked on

How to grab the printer icon click event from PrintDocument

I am using PrintDocument for printing my reports.  My boss has required that the report do this sequence of actions:

1. Preview report
2. When printer button is clicked, go to a PrintDialog to edit printer settings
3. Print report

Now, I've found that I can assign a BeginPrint event to the document, but that triggers both when the preview is printed and when the printer icon is clicked.  I need something that is going to catch the print icon click event from the preview of a PrintDocument.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Are you using a PrintDocument, PrintPreviewControl, and a PrintDialog in combination, as described in this article?

The Print Dialog Box
http://www.functionx.com/vcsharp2008/controls/dlgprint.htm
Avatar of FrancineTaylor
FrancineTaylor

ASKER

This doesn't tell me anything about the PrintPreviewDialog, which is what is used to preview a report for a PrintDocument.  The ShowDialog() method on the PrintPreviewControl displays the report in the form, and presents the user with a "print" button.

If that button is clicked, the report prints.

I need to be able to intercept that button click so I can present the user with a PrintDialog before printing occurs.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial