PrintQueue.IsNotAvailable Property
.NET Framework 3.0
Gets a value that indicates whether the printer is available.
Namespace: System.Printing
Assembly: System.Printing (in system.printing.dll)
Assembly: System.Printing (in system.printing.dll)
The following example shows how to use this property as part of a survey all printers for possible error status. For the complete sample, see Survey Status of Printers Sample.
// Check for possible trouble states of a printer using its properties internal static void SpotTroubleUsingProperties(ref String statusReport, PrintQueue pq) { if (pq.HasPaperProblem) { statusReport = statusReport + "Has a paper problem. "; } if (!(pq.HasToner)) { statusReport = statusReport + "Is out of toner. "; } if (pq.IsDoorOpened) { statusReport = statusReport + "Has an open door. "; } if (pq.IsInError) { statusReport = statusReport + "Is in an error state. "; } if (pq.IsNotAvailable) { statusReport = statusReport + "Is not available. "; } if (pq.IsOffline) { statusReport = statusReport + "Is off line. "; } if (pq.IsOutOfMemory) { statusReport = statusReport + "Is out of memory. "; } if (pq.IsOutOfPaper) { statusReport = statusReport + "Is out of paper. "; } if (pq.IsOutputBinFull) { statusReport = statusReport + "Has a full output bin. "; } if (pq.IsPaperJammed) { statusReport = statusReport + "Has a paper jam. "; } if (pq.IsPaused) { statusReport = statusReport + "Is paused. "; } if (pq.IsTonerLow) { statusReport = statusReport + "Is low on toner. "; } if (pq.NeedUserIntervention) { statusReport = statusReport + "Needs user intervention. "; } // Check if queue is even available at this time of day // The following method is defined in the complete example. ReportAvailabilityAtThisTime(ref statusReport, pq); }//end SpotTroubleUsingProperties
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.