This documentation is archived and is not being maintained.

PrintDocument.BeginPrint Event

Occurs when the Print method is called and before the first page of the document prints.

[Visual Basic]
Public Event BeginPrint As PrintEventHandler
public event PrintEventHandler BeginPrint;
public: __event PrintEventHandler* BeginPrint;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type PrintEventArgs containing data related to this event. The following PrintEventArgs property provides information specific to this event.

Property Description
Cancel (inherited from CancelEventArgs) Gets or sets a value indicating whether the event should be canceled.


Typically, you handle the BeginPrint event to initialize fonts, file streams, and other resources used during the printing process.

To associate the event with your event handler, add an instance of the PrintEventHandler delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see Events and Delegates.


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

PrintDocument Class | PrintDocument Members | System.Drawing.Printing Namespace | PrintEventHandler | PrintEventArgs | EndPrint | PrintPage | QueryPageSettings