PrinterMonitorComponent Class

For a list of all members of this type, see PrinterMonitorComponent Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         PrinterQueueWatch.PrinterMonitorComponent

[Visual Basic]
Public Class PrinterMonitorComponent
   Inherits System.ComponentModel.Component
[C#]
public class PrinterMonitorComponent : System.ComponentModel.Component
[C++]
public __gc class PrinterMonitorComponent : public System.ComponentModel.Component
[JScript]
public class PrinterMonitorComponent extends System.ComponentModel.Component

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The PrinterMonitorComponent control allows the user to monitor the job queue of a selected printer and react to jobs being added, removed, written or changed and to react to the

Example

The following example creates a PrinterMonitorComponent control to monitor a printer named "HP LaserJet 4". This example uses the MonitorJobWrittenEvent and MonitorJobSetEvent properties to exclude the events we are not interested in.

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

    ' Start monitoring the HP Laserjet 4 printer
    PrinterMonitorComponent1.DeviceName = "HP Laserjet 4"

End Sub


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

    // Start monitoring the HP Laserjet 4 printer
    PrinterMonitorComponent1.DeviceName = "HP Laserjet 4";

 }
 
 

Requirements

Namespace: PrinterQueueWatch

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

Assembly: PrinterQueueWatch (in PrinterQueueWatch.dll)

See Also

© 2003 Merrion Computing Ltd. All rights reserved.