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 _ ) [C#] public virtual void OnEndPrint( PrintDocument document, PrintEventArgs e ); [C++] public: virtual void OnEndPrint( PrintDocument* document, PrintEventArgs* e ); [JScript] public function OnEndPrint( document : PrintDocument, e : PrintEventArgs );
- A PrintDocument that represents the document currently being printed.
- A PrintEventArgs that contains the event data.
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