PrintControllerWithStatusDialog Class
Assembly: System.Windows.Forms (in system.windows.forms.dll)
This class implements a PrintController and adds a status dialog box. A print controller specifies how a PrintDocument is printed.
For a list of initial property values for an instance of the PrintControllerWithStatusDialog class, see the PrintControllerWithStatusDialog constructor.
For more information about printing with Windows Forms, see the System.Drawing.Printing namespace overview. If you want to print from a Windows Presentation Foundation application, see the System.Printing namespace.
The following code example shows how to create a new PrintController and assign it to the PrintController property. The example assumes that you have added the System.Drawing.Printing namespace to the class and that you have created a new instance of a PrintDocument as myDocumentPrinter.
void myPrint() { if (useMyPrintController==true) { myDocumentPrinter.PrintController = new myControllerImplementation(); if (wantsStatusDialog==true) { myDocumentPrinter.PrintController = new PrintControllerWithStatusDialog(myDocumentPrinter.PrintController); } } myDocumentPrinter.Print(); }
void MyPrint()
{
if (useMyPrintController == true) {
myDocumentPrinter.set_PrintController
(new MyControllerImplementation());
if (wantsStatusDialog == true) {
myDocumentPrinter.set_PrintController
(new PrintControllerWithStatusDialog
(myDocumentPrinter.get_PrintController()));
}
}
myDocumentPrinter.Print();
} //MyPrint
System.Drawing.Printing.PrintController
System.Windows.Forms.PrintControllerWithStatusDialog
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.