Home > BSPrinter documentation > Reference

Events Property

Applies to: IPrinterEx object

Type: Object (Read only)


Description:

Returns a PrinterExEvents object that can be used to receive events from the IPrinterEx object's interface.

Sample usage:

Private WithEvents mPrinterExEvents As PrinterExEvents

Private Sub Form_Load()
    Set mPrinterExEvents = PrintPreview.Events
End Sub

Private Sub mPrinterExEvents_ReportPrinted()
    MsgBox "Printed"
End Sub


If is only necessary for getting events when the object supplied by the PrintPreview global property is used instead of a PrintPreview control.
When a PrintPreview control is used, it is not necessary because the events are handled by the control itself.
It can be also used when using PrintPreview controls though, to have a centralized event handler for all the controls.