See Also: PrintController Members
When implemented in a derived class, System.Drawing.Printing.PrintController controls how a System.Drawing.Printing.PrintDocument is printed. PrintDocument.Print invokes the print controller's PrintController.OnStartPrint(PrintDocument, PrintEventArgs), PrintController.OnEndPrint(PrintDocument, PrintEventArgs), PrintController.OnStartPage(PrintDocument, PrintPageEventArgs), and PrintController.OnEndPage(PrintDocument, PrintPageEventArgs) methods, which in turn tell the printer how to print the document. Print preview uses a specialized System.Drawing.Printing.PrintController. For an example of a print controller that is specialized for print preview, see the System.Drawing.Printing.PreviewPrintController.
The .NET Framework includes three print controllers that are derived from System.Drawing.Printing.PrintController that help accomplish common tasks. The System.Drawing.Printing.StandardPrintController prints a document to a printer. The System.Drawing.Printing.PreviewPrintController generates a preview of what the document will look like when printed and is used by the System.Windows.Forms.PrintPreviewControl and System.Windows.Forms.PrintPreviewDialog classes. The System.Windows.Forms.PrintControllerWithStatusDialog provides a printing status dialog during the printing process.
For more information about printing with Windows Forms, see the System.Drawing.Printing namespace overview. If you wish to print from a Windows Presentation Foundation application, see the System.Printing namespace.