This documentation is archived and is not being maintained.

PrintQueue Class

Manages printers and print jobs.

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

[PrintingPermissionAttribute(SecurityAction.InheritanceDemand, Level = PrintingPermissionLevel.DefaultPrinting)]
public class PrintQueue : PrintSystemObject

Some properties of the PrintQueue object represent characteristics of the print queue utility that runs on the computer, but others represent features or states of the printer itself. For example, NumberOfJobs is a characteristic of the print queue, but Location is a property of the printer. Many of the properties of the printer, such as whether it needs user attention, need to be passed, by means of the Refresh method, from the printer itself to the PrintQueue object. This should be done before the corresponding property (NeedUserIntervention) is read by your program. Similarly, when your program changes the values of one or more properties of a PrintQueue object, the change must be written to the actual print queue utility on the computer. Do this with the Commit method.

Notes to Inheritors:

For guidance about deriving from this class, see How to: Extend the Print Schema and Create New Print System Classes.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0