PrinterMonitorComponent.MonitorJobSetEvent Property

Gets or sets a value indicating whether the PrinterMonitorComponent control monitors the job set event.

[Visual Basic]
Public Property MonitorJobSetEvent As Boolean
[C#]
public bool MonitorJobSetEvent {get; set;}
[C++]
public: __property bool get_MonitorJobSetEvent();
public: __property void set_MonitorJobSetEvent(bool);
[JScript]
public function get MonitorJobSetEvent() : boolean;
public function set MonitorJobSetEvent(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 Set.

The JobSet event is fired when a print job in the queue is changed in some way by the user - for example if they change the priority using the control panel

Example

[Visual Basic, C#] The following example creates a PrinterMonitorComponent control to monitor a printer named "Cannon BJC640". This example uses the MonitorJobSetEvent property to exclude the job Set and increase the thread polling frequency 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 JobSet Events
    PrinterMonitorComponent1.MonitorJobSetEvent = False


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

End Sub


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

    // Start monitoring the HP Laserjet 4 printer
    PrinterMonitorComponent1.MonitorJobSetEvent = "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.