See Also: PreviewPrintController Members
Typically, to use the print preview feature, you create an instance of a System.Windows.Forms.PrintPreviewControl or System.Windows.Forms.PrintPreviewDialog class and set its System.Windows.Forms.PrintPreviewControl.Document property. The System.Drawing.Printing.PreviewPrintController is used by the System.Windows.Forms.PrintPreviewControl and System.Windows.Forms.PrintPreviewDialog classes, though you can use the System.Drawing.Printing.PreviewPrintController when managing the display of your own print preview window.
PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) creates the System.Drawing.Graphics that is displayed during the print preview. After PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) is called, the PreviewPrintController.OnStartPage(PrintDocument, PrintPageEventArgs) method sets the System.Drawing.Graphics to a graphic of a single page. The PreviewPrintController.OnEndPage(PrintDocument, PrintPageEventArgs) method clears the System.Drawing.Graphics, while the PreviewPrintController.OnEndPrint(PrintDocument, PrintEventArgs) method deallocates the object.
For more information about printing, see the System.Drawing.Printing namespace overview.