|
|
Gets the name of the machine that this print job was sent from
[Visual Basic] Public ReadOnly Property MachineName As String [C#] public string MachineName {get;} [C++] public: __property string get_MachineName(); [JScript] public function get MachineName() : string;
Set to the name of the machine that sent this job to be printed
[Visual Basic] The following example prints the name of the machine that sent 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(.MachineName & " - had a job deleted")
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