Windows Forms Print Support
Printing in Windows Forms consists primarily of using the PrintDocument Component (Windows Forms) component to enable the user to print, and the PrintPreviewDialog Control (Windows Forms) control, PrintDialog Component (Windows Forms) and PageSetupDialog Component (Windows Forms) components to provide a familiar graphical interface to users accustomed to the Windows operating system.
Typically, you create a new instance of the PrintDocument component, set the properties that describe what to print using the PrinterSettings and PageSettings classes, and call the Print method to actually print the document.
During the course of printing from a Windows-based application, the PrintDocument component will show an abort print dialog box to alert users to the fact that printing is occurring and to allow the print job to be canceled.
In This Section
- How to: Create Standard Windows Forms Print Jobs
Explains how to use the PrintDocument component to print from a Windows Form.
- How to: Capture User Input from a PrintDialog at Run Time
Explains how to modify selected print options programmatically using the PrintDialog component.
- How to: Choose the Printers Attached to a User's Computer in Windows Forms
Describes changing the printer to print to using the PrintDialog component at run time.
- How to: Print Graphics in Windows Forms
Describes sending graphics to the printer.
- How to: Print a Multi-Page Text File in Windows Forms
Describes sending text to the printer.
- How to: Complete Windows Forms Print Jobs
Explains how to alert users to the completion of a print job.
- How to: Print a Windows Form
Shows how to print a copy of the current form.
- How to: Print in Windows Forms Using Print Preview
Shows how to use a PrintPreviewDialog for printing a document.
Related Sections
- PrintDocument Component (Windows Forms)
Explains usage of the PrintDocument component.
- PrintDialog Component (Windows Forms)
Explains usage of the PrintDialog component.
- PrintPreviewDialog Control (Windows Forms)
Explains usage of the PrintPreviewDialog control.
- PageSetupDialog Component (Windows Forms)
Explains usage of the PageSetupDialog component.
- System.Drawing.Printing
Describes the classes in the System.Drawing.Printing namespace.