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.
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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The Print Dialog Box
http://www.functionx.com/vcsharp2008/controls/dlgprint.htm