Export (0) Print
Expand All

PrintController.OnEndPrint Method

When overridden in a derived class, completes the control sequence that determines when and how to print a document.

[Visual Basic]
Public Overridable Sub OnEndPrint( _
   ByVal document As PrintDocument, _
   ByVal e As PrintEventArgs _
public virtual void OnEndPrint(
 PrintDocument document,
 PrintEventArgs e
public: virtual void OnEndPrint(
 PrintDocument* document,
 PrintEventArgs* e
public function OnEndPrint(
   document : PrintDocument,
 e : PrintEventArgs


A PrintDocument that represents the document currently being printed.
A PrintEventArgs that contains the event data.


OnEndPrint is called immediately after the PrintDocument raises the EndPrint event.

OnStartPrint creates the Graphics object that is sent to the printer. After OnStartPrint is called, the OnStartPage method sets the Graphics object to a grahpic of a single page. (Use the OnStartPrint method to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document.) The OnEndPage method clears the Graphics object, while the OnEndPrint method deallocates the object.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

PrintController Class | PrintController Members | System.Drawing.Printing Namespace | OnEndPage | OnStartPage | OnStartPrint | PrintDocument | PrintEventArgs

© 2014 Microsoft