PrinterMonitorComponent.MonitorPrinterChangeEvent Property

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

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

Property Value

If set to false the printer monitor component will not raise any event when the PrinterInformation is changes for 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 MonitorPrinterChangeEvent property to exclude the printer change events 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 PrinterChange Events
    PrinterMonitorComponent1.MonitorPrinterChangeEvent = False


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

End Sub


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

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