PrintJob.Cancel Method

Cancels this print job

[Visual Basic]
Public Sub Cancel 
[C#]
public void Cancel();
[C++]
public: void Cancel();
[JScript]
public function Cancel();

Remarks

Throws an InsufficentPrintJobAccessRightsException if the logged in user does not have sufficient privilege to cancel this print job

Example

[Visual Basic] The following example Cancels a job

[Visual Basic] 
Public Sub CancelAJob(ByVal pjIn As PrintJob)

   With pjIn
     Try
       .Cancel
     Catch ej As PrinterQueueWatch.PrinterMonitoringExceptions.InsufficentPrintJobAccessRightsException
       Debug.Write("You cannot cancel this print job")
     End Try
   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.