PrintControllerWithStatusDialog Class
Assembly: System.Windows.Forms (in system.windows.forms.dll)
This class implements a PrintController and adds a status dialog. 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.
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.
Sub myPrint() If useMyPrintController = True Then myDocumentPrinter.PrintController = New myControllerImplementation() If wantsStatusDialog = True Then myDocumentPrinter.PrintController = _ New PrintControllerWithStatusDialog(myDocumentPrinter.PrintController) End If End If myDocumentPrinter.Print() End Sub
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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.