PrintJob.Paused Property

Returns true if job is paused, otherwise false.

[Visual Basic]
Public Property Paused As Boolean
[C#]
public bool Paused {get;set}
[C++]
public: __property bool get_Paused();
public: __property void set_Paused(bool);
[JScript]
public function get Paused() : boolean;
public function set Paused(boolean);

Property Value

Returns true if job is paused, otherwise false. If IsEditable is true then you can set this value to pause or resume the job respectively.

Remarks

If IsEditable is false then any attempt to set this property will raise a trappable runtime error

Example

[Visual Basic] The following example pauses any color job when the job is added to the queue being monitored

[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 .Color And .IsEditable Then
        .Paused = True
      End If
   End With

End Sub

Requirements

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.