PrintJob.MachineName Property

Gets the name of the machine that this print job was sent from

[Visual Basic]
Public ReadOnly Property MachineName As String
public string MachineName {get;}
public: __property string get_MachineName();
public function get MachineName() : string;

Property Value

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

See Also

PrintJob overview , All PrintJob members

© 2003 Merrion Computing Ltd. All rights reserved.