PrintControllerWithStatusDialog Class
TOC
Collapse the table of content
Expand the table of content

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)

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

public class PrintControllerWithStatusDialog : PrintController

NameDescription
System_CAPS_pubmethodPrintControllerWithStatusDialog(PrintController)

Initializes a new instance of the PrintControllerWithStatusDialog class, wrapping the supplied PrintController.

System_CAPS_pubmethodPrintControllerWithStatusDialog(PrintController, String)

Initializes a new instance of the PrintControllerWithStatusDialog class, wrapping the supplied PrintController and specifying a title for the dialog box.

NameDescription
System_CAPS_pubpropertyIsPreview

Gets a value indicating this PrintControllerWithStatusDialog is used for print preview.(Overrides PrintController.IsPreview.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodOnEndPage(PrintDocument, PrintPageEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Completes the control sequence that determines when and how to print a page of a document.(Overrides PrintController.OnEndPage(PrintDocument, PrintPageEventArgs).)

System_CAPS_pubmethodOnEndPrint(PrintDocument, PrintEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Completes the control sequence that determines when and how to print a document.(Overrides PrintController.OnEndPrint(PrintDocument, PrintEventArgs).)

System_CAPS_pubmethodOnStartPage(PrintDocument, PrintPageEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Begins the control sequence that determines when and how to print a page of a document.(Overrides PrintController.OnStartPage(PrintDocument, PrintPageEventArgs).)

System_CAPS_pubmethodOnStartPrint(PrintDocument, PrintEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Begins the control sequence that determines when and how to print a document.(Overrides PrintController.OnStartPrint(PrintDocument, PrintEventArgs).)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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

.NET Framework
Available since 1.1

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

Return to top
Show:
© 2016 Microsoft