|
|
Gets the user name of the user to be notified when this job is printed
[Visual Basic] Public Property NotifyuserName As String [C#] public string NotifyuserName {get;set}
Set to the login user name of the user to be notified when this job is printed
This value may be blank, in which case only the user who printed the job (as held in the Username property) will be notified
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 notifies "Teacher" of all print jobs by "Student01"
[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 = "Student01" Try .NotifyUsername = "Teacher" .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.