|
|
Gets the text describing the status of this print job
[Visual Basic] Public ReadOnly Property StatusDescription As String [C#] public string StatusDescription {get;} [C++] public: __property string get_StatusDescription(); [JScript] public function get StatusDescription() : string;
Gets the text describing the status of the job, as it would appear in the printer queue list.
[Visual Basic] The following example prints the details of a job to a trace when a job is deleted from the queue being monitored
[Visual Basic]
Private mPr As PrinterMonitorComponent
Public Sub StartWatching(ByVal PrinterDeviceName As String)
mPr = New PrinterMonitorComponent()
AddHandler mPr.JobDeleted, AddressOf Deletedtest
mPr.ThreadTimeout = -1
mPr.DeviceName = PrinterDeviceName
End Sub
Public Sub Deletedtest(ByVal sender As Object, ByVal e As EventArgs)
With CType(e, PrintJobEventArgs).PrintJob
Trace.WriteLine("Job deleted : - Details...")
Trace.WriteLine("** Colour: " & .Color.ToString)
Trace.WriteLine("** Copies: " & .Copies.ToString)
Trace.WriteLine("** Data Type: " & .DataType)
Trace.WriteLine("** Document: " & .Document)
Trace.WriteLine("** Printer Driver: " & .DriverName)
Trace.WriteLine("** Landscape?: " & .Landscape.ToString)
Trace.WriteLine("** Machine: " & .MachineName)
Trace.WriteLine("** User to notify: " & .NotifyUserName)
Trace.WriteLine("** Pages Printed: " & .PagesPrinted.ToString)
Trace.WriteLine("** Paper Source: " & .PaperSource.ToString)
Trace.WriteLine("** Position in the queue: " & .Position.ToString)
Trace.WriteLine("** Printer Name: " & .PrinterName)
Trace.WriteLine("** Printer Resolution: " & .PrinterResolutionKind.ToString)
Trace.WriteLine("** Print Processor Name: " & .PrintProcessorName)
Trace.WriteLine("** Parameters: " & .Parameters)
Trace.WriteLine("** Print Processor: " & .PrintProcessorName)
Trace.WriteLine("** Status: " & .StatusDescription)
Trace.WriteLine("** Total pages: " & .TotalPages.ToString)
Trace.WriteLine("** User name: " & .Username)
Trace.WriteLine("** Paper Kind: " & .PaperKind.ToString)
Trace.WriteLine("** Paper Length: " & .PaperLength.ToString)
Trace.WriteLine("** Paper Width: " & .PaperWidth.ToString)
Trace.WriteLine("** Status: Paused? " & .Paused.ToString)
Trace.WriteLine("** Status: Deleted? " & .Deleted.ToString)
Trace.WriteLine("** Status: Deleting? " & .Deleting.ToString)
Trace.WriteLine("** Status: User intervention required? " & .UserInterventionRequired.ToString)
End With
End Sub
Namespace: PrinterQueueWatch
Platforms: Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
PrintJob overview , All PrintJob members