Export (0) Print
Expand All

PrintControllerWithStatusDialog Class

Controls how a document is printed from a Windows Forms application.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public class PrintControllerWithStatusDialog : PrintController

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();
}

System.Object
  System.Drawing.Printing.PrintController
    System.Windows.Forms.PrintControllerWithStatusDialog

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft