|
|
Specifies the earliest time that the job can be printed
[Visual Basic] Public Property TimeWindow As TimeWindow [C#] public TimeWindow TimeWindow {get;set}
Specifies the earliest time that the job can be printed
If TimeWindow.Unrestricted is true then there is no time restiction on this print job. If a printer has a set time restriction range then the print job time restriction range must fall within that range.
[Visual Basic] The following example prints the details of a job to a trace when a job is added to the queue being monitored
[Visual Basic]
Private mPr As PrinterMonitorComponent
Public Sub StartWatching(ByVal PrinterDeviceName As String)
mPr = New PrinterMonitorComponent()
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
Trace.WriteLine("Job added : - Details...")
Trace.WriteLine("** Colour: " & .Color.ToString)
Trace.WriteLine("** Copies: " & .Copies.ToString)
Trace.WriteLine("** Data Type: " & .DataType)
Trace.WriteLine("** Document: " & .Document)
If .TimeWindow.Unrestricted Then
Trace.WriteLine("** No time restriction on this print job")
Else
Trace.WriteLine("** Earliest Start Time: " & .TimeWindow.StartTime)
Trace.WriteLine("** Latest print start time: " & .TimeWindow.EndTime)
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 , TimeWindow overview , All TimeWindow members
© 2003 Merrion Computing Ltd. All rights reserved.