PrinterSettings.PrinterResolutionCollection Class
Contains a collection of PrinterResolution objects.
Assembly: System.Drawing (in System.Drawing.dll)
The PrinterSettings.PrinterResolutionCollection contains PrinterResolution instances that represents the printer resolutions supported through the PrinterResolution.Kind property, which contains one of the PrinterResolutionKind values.
Typically, you set the printer's resolution through the PageSettings.PrinterResolution property to a valid PrinterResolution instance available through the PrinterResolutions collection.
If PrinterResolutionKind is Custom, then use the X and Y properties to determine the custom printer resolution in the horizontal and vertical directions, respectively.
The following code example populates the comboPrintResolution combo box with the supported resolutions. The example requires that a PrintDocument variable named printDoc exists and that the specific combo box exists.
' Add list of printer resolutions found on the printer to the combobox. ' The PrinterResolution's ToString() method will be used to provide the display string. Dim pkResolution As PrinterResolution For i = 0 to printDoc.PrinterSettings.PrinterResolutions.Count - 1 pkResolution = printDoc.PrinterSettings.PrinterResolutions.Item(i) comboPrintResolution.Items.Add(pkResolution) Next
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
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.