PrinterMonitorComponent.MonitorJobAddedEvent Property

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

[Visual Basic]
Public Property MonitorJobAddedEvent As Boolean
[C#]
public bool MonitorJobAddedEvent {get; set;}
[C++]
public: __property  bool  get_MonitorJobAddedEvent();
public: __property void set_MonitorJobAddedEvent( bool);
[JScript]
public function get MonitorJobAddedEvent() : boolean;
public function set MonitorJobAddedEvent(boolean);

Property Value

If set to false the printer monitor component will not raise any event when a PrintJob is added to 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 added.

Example

[Visual Basic, C#] The following example creates a PrinterMonitorComponent control to monitor a printer named "Cannon BJC640". This example uses the MonitorJobAddedEvent property to exclude the job added 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 JobAdded Events
    PrinterMonitorComponent1.MonitorJobAddedEvent = False


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

End Sub


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

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