Dela via


PrintDialog Component Overview (Windows Forms)

The Windows Forms PrintDialog component is a pre-configured dialog box used to select a printer, choose the pages to print, and determine other print-related settings in Windows-based applications. Use it as a simple solution for printer and print-related settings selection in lieu of configuring your own dialog box. You can enable users to print many parts of their documents: print all, print a selected page range, or print a selection. By relying on standard Windows dialog boxes, you create applications whose basic functionality is immediately familiar to users. The PrintDialog component inherits from the CommonDialog class.

Working with the Component

Use the ShowDialog method to display the dialog box at run time. This component has properties that relate to either a single print job (PrintDocument class) or the settings of an individual printer (PrinterSettings class). Either of these, in turn, may be shared by multiple printers.

When it is added to a form, the PrintDialog component appears in the tray at the bottom of the Windows Forms Designer.

See Also

Reference

PrintDialog

Other Resources

PrintDialog Component (Windows Forms)