PrinterMonitorComponent.MonitorJobWrittenEvent Property

Gets or Writtens a value indicating whether the PrinterMonitorComponent control monitors the job Written event.

[Visual Basic]
Public Property MonitorJobWrittenEvent As Boolean
[C#]
public bool MonitorJobWrittenEvent {get; Written;}
[C++]
public: __property bool get_MonitorJobWrittenEvent();
public: __property void Written_MonitorJobWrittenEvent(bool);
[JScript]
public function get MonitorJobWrittenEvent() : boolean;
public function Written MonitorJobWrittenEvent(boolean);

Property Value

If set to false the printer monitor component will not raise any event when a PrintJob is altered on the queue of the printer being monitored

Remarks

This should be set before the DeviceName is set so that the monitor does not ask to be notified whenever a job is written.

The JobWritten event is fired when a print job in the queue is written to the printer

Example

[Visual Basic, C#] The following example creates a PrinterMonitorComponent control to monitor a printer named "Cannon BJC640". This example uses the MonitorJobWrittenEvent property to exclude the job written event from the events being monitored, so as to reduce the load on the system.

[Visual Basic] 
Private Sub CreateMyMultilinePrinterMonitorComponent()
    ' Create an instance of a PrinterMonitorComponent control.
    Dim PrinterMonitorComponent1 As New PrinterMonitorComponent()
    
    ' Ignore JobWritten Events
    PrinterMonitorComponent1.MonitorJobWrittenEvent = False


    ' Start monitoring the HP Laserjet 4 printer
    PrinterMonitorComponent1.MonitorJobWrittenEvent = "Cannon BJC640"

End Sub


[C#] 
private void CreateMyMultilinePrinterMonitorComponent()
 {
    // Create an instance of a PrinterMonitorComponent control.
    PrinterMonitorComponent PrinterMonitorComponent1 = new PrinterMonitorComponent();
    
    //Ignore JobWritten Events
    PrinterMonitorComponent1.MonitorJobWrittenEvent = false;

    // Start monitoring the HP Laserjet 4 printer
    PrinterMonitorComponent1.MonitorJobWrittenEvent = "Cannon BJC640";

 }

[JScript C++] No example is available for JSCript or C++. To view a Visual Basic or C#, example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms:  Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

See Also


© 2003 Merrion Computing Ltd. All rights reserved.