PrintQueue.Resume Method ()


Restarts a print queue that was paused.

Namespace:   System.Printing
Assembly:  System.Printing (in System.Printing.dll)

Public Overridable Sub Resume

Exception Condition

The printer cannot resume.

The following example shows how to use this method to resume a paused print queue.

Friend Shared Sub HandlePausedJob(ByVal theJob As PrintSystemJobInfo)
	' If there's no good reason for the queue to be paused, resume it and 
	' give user choice to resume or cancel the job.
	Console.WriteLine("The user or someone with administrative rights to the queue" & vbLf & "has paused the job or queue." & vbLf & "Resume the queue? (Has no effect if queue is not paused.)" & vbLf & "Enter ""Y"" to resume, otherwise press return: ")
	Dim [resume] As String = Console.ReadLine()
	If [resume] = "Y" Then

		' It is possible the job is also paused. Find out how the user wants to handle that.
		Console.WriteLine("Does user want to resume print job or cancel it?" & vbLf & "Enter ""Y"" to resume (any other key cancels the print job): ")
		Dim userDecision As String = Console.ReadLine()
		If userDecision = "Y" Then
		End If
	End If 'end if the queue should be resumed

End Sub 'end HandlePausedJob

.NET Framework
Available since 3.0
Return to top