PrinterMonitorComponent.PrinterInformation Property

Gets the printer information for this printer

[Visual Basic]
Public ReadOnly Property PrinterInformation As PrinterInformation
[Visual Basic]
Public ReadOnly Property PrinterInformation(ByVal DeviceName As String) As PrinterInformation

Property Value

Returns the PrinterInformation class that gives the setup and status information for the printer being monitored.

Remarks

If the component is only monitoring one printer then the first syntax is used, otherwise the device name of the printer which is being monitored and for which information is needed is passed as a parameter.

Example

[Visual Basic, C#]

[Visual Basic] 
Public Sub ListJobs()

   Dim mPr As PrinterQueueWatch.PrinterMonitorComponent()
   mPr = New PrinterQueueWatch.PrinterMonitorComponent()

   mPr.ThreadTimeout = -1
   mPr.DeviceName = "HP LaserJet 5L"

   With mPr.PrinterInformation
       Trace.WriteLine(" Pages per month: " & .AveragePagesPerMonth.ToString)
       Trace.WriteLine(" Comment: " & .Comment)
       Trace.WriteLine(" Default Data Type: " & .DefaultDataType)
       Trace.WriteLine(" Driver name " & .DriverName)
       Trace.WriteLine(" Total jobs: " & .JobCount.ToString)
       Trace.WriteLine(" Location: " & .Location)
       Trace.WriteLine(" Parameters: " & .Parameters)
       Trace.WriteLine(" Port Name: " & .PortName)
       Trace.WriteLine(" Printer name: " & .PrinterName)
       Trace.WriteLine(" Processor: " & .PrintProcessor)
       Trace.WriteLine(" Seperator File:" & .SeperatorFilename)
       Trace.WriteLine(" Server name: " & .ServerName)
       Trace.WriteLine(" Share name: " & .ShareName)
   End With

   mPr.AddPrinter("Canon 600")
   With mPr.PrinterInformation("HP LaserJet 5L")
       Trace.WriteLine(" Printer name: " & .PrinterName)
   End With
End Sub

[JScript C++ C#] No example is available for JSCript, C# or C++. To view a Visual Basic 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

PrinterMonitorComponent overview , All PrinterMonitorComponent members


© 2003 Merrion Computing Ltd. All rights reserved.