PrintQueue::Resume Method ()
.NET Framework (current version)
Restarts a print queue that was paused.
Assembly: System.Printing (in System.Printing.dll)
| Exception | Condition |
|---|---|
| PrintSystemException | The printer cannot resume. |
The following example shows how to use this method to resume a paused print queue.
static void HandlePausedJob (PrintSystemJobInfo^ theJob) { // 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" + "\nhas paused the job or queue." + "\nResume the queue? (Has no effect if queue is not paused.)" + "\nEnter \"Y\" to resume, otherwise press return: "); String^ resume = Console::ReadLine(); if (resume == "Y") { theJob->HostingPrintQueue->Resume(); // 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?" + "\nEnter \"Y\" to resume (any other key cancels the print job): "); String^ userDecision = Console::ReadLine(); if (userDecision == "Y") { theJob->Resume(); } else { theJob->Cancel(); } } };
.NET Framework
Available since 3.0
Available since 3.0
Show: