If you go in Visual Studio 2005 to the following (or just do ctrl+p): File ==> Print..
You get a print dialog screen. I want the same in my program, but how?
To display the Print dialog box, click (Down arrow) of the Print button or the Start Printing button in the Preview screen, and select Check Settings and Print....
The Print dialog box lets the user select options for a particular print job. For example, the user can specify the printer to use, the range of pages to print, and the number of copies.
The print dialog box is a window that allows you to select various options for printing your workbook. You can access the print dialog box by clicking the File tab, then click Print, or by pressing the Ctrl+P keys on your keyboard.
This dialog box is a so-called common dialog, a built-in Windows dialog that can be used by multiple applications.
To use this dialog box in your C# application, you can use the PrintDialog
class. The following MSDN pages contains descriptions as well as some sample code:
If you use WPF, you may use PrintDialog
: http://msdn.microsoft.com/en-us/library/system.windows.controls.printdialog.aspx
if you're into WinForms you may use...PrintDialog
: http://msdn.microsoft.com/en-us/library/system.windows.forms.printdialog.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With