|
|
Gets the print job's Priority in the printer spool queue.
[Visual Basic] Public ReadOnly Property Priority As Integer [C#] public int Priority {get;} [C++] public: __property int get_Priority(); [JScript] public function get Priority() : int;
Gets the print job's priority. Jobs with a higher priority should be printed ahead of jobs with a lower priority.
This value can be between 1 (lowest) and 99 (highest)
Throws an InsufficentPrintJobAccessRightsException if set and the logged in user does not have sufficient privilege to alter this print job
[Visual Basic] The following example sets the "BigBoss" user priority to the highest
[Visual Basic] Private mPr As PrinterMonitorComponent Public Sub StartWatching(ByVal PrinterDeviceName As String) mPr = New PrinterMonitorComponent() '\\ For efficieny reasons, do not monitor printer information changed events mPr.MonitorPrinterChangeEvent = False AddHandler mPr.JobAdded, AddressOf Addedtest mPr.ThreadTimeout = -1 mPr.DeviceName = PrinterDeviceName End Sub Public Sub Addedtest(ByVal sender As Object, ByVal e As EventArgs) With CType(e, PrintJobEventArgs).PrintJob If .Username = "BigBoss" Try .Priority = 99 .Commit() Catch ej As PrinterQueueWatch.PrinterMonitoringExceptions.InsufficentPrintJobAccessRightsException Debug.Write("You cannot change this print job") End Try End If 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
© 2003 Merrion Computing Ltd. All rights reserved.