title | description | ms.date | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|
How to display the PrintDialog component |
Learn how to display the PrintDialog component which is the standard print dialog box many Windows users recognize. |
03/30/2017 |
|
745a8db7-0526-4b21-b09d-18e13ed32014 |
The xref:System.Windows.Forms.PrintDialog component is the standard Windows print dialog box that many of your users will be familiar with. Because your users will be immediately comfortable with it, it would be beneficial for you to use the xref:System.Windows.Forms.PrintDialog component.
-
Call the xref:System.Windows.Forms.Form.ShowDialog%2A method from within the code of your application.
Once the component is shown, users will interact with it, setting the properties of the print job. These are saved in the xref:System.Drawing.Printing.PrinterSettings class (and the xref:System.Drawing.Printing.PageSettings class, if the user accesses the PageSetupDialog Component through the xref:System.Windows.Forms.PrintDialog component) associated with that print job. You can then make calls to the properties they set to determine the specifics of the print job.