PrinterMonitorComponent Constructor

Initializes a new instance of the PrinterMonitorComponent class.

[Visual Basic]
Public Sub New()
[C#]
public PrinterMonitorComponent();
[C++]
public: PrinterMonitorComponent();
[JScript]
public function PrinterMonitorComponent();

Remarks

The parent container control defines the color and font settings for the PrinterMonitorComponent.

Example

[Visual Basic, C#] The following example creates a new instance of the PrinterMonitorComponent control and assigns a string to the control's DeviceName property to start monitoring that printer.

[Visual Basic] 
Public Sub CreateMyPrinterMonitorComponentControl()
    ' Create a new PrinterMonitorComponent control using this constructor.
    Dim PrinterMonitorComponent1 As New PrinterMonitorComponent()
    ' Assign the device name to the new PrinterMonitorComponent control to monitor.
    PrinterMonitorComponent1.Text = "Cannon BJ540 Colour"

End Sub


[C#] 
public void CreateMyPrinterMonitorComponentControl()
 {
    // Create a new PrinterMonitorComponent control using this constructor.
    PrinterMonitorComponent PrinterMonitorComponent1 = new PrinterMonitorComponent();
    // Assign the device name to the new PrinterMonitorComponent control to monitor.
    PrinterMonitorComponent1.DeviceName = "HP LaserJet 4";

 }
       

[C++, JScript] No example is available for C++ or JScript.

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.