PrinterSettings.PrinterResolutionCollection Class

 

Contains a collection of PrinterResolution objects.

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

System.Object
  System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection

Public Class PrinterResolutionCollection
	Implements ICollection, IEnumerable

NameDescription
System_CAPS_pubmethodPrinterSettings.PrinterResolutionCollection(PrinterResolution())

Initializes a new instance of the PrinterSettings.PrinterResolutionCollection class.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of available printer resolutions in the collection.

System_CAPS_pubpropertyItem(Int32)

Gets the PrinterResolution at a specified index.

NameDescription
System_CAPS_pubmethodAdd(PrinterResolution)

This API supports the product infrastructure and is not intended to be used directly from your code. Adds a PrinterResolution to the end of the collection.

System_CAPS_pubmethodCopyTo(PrinterResolution(), Int32)

Copies the contents of the current PrinterSettings.PrinterResolutionCollection to the specified array, starting at the specified index.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that can iterate through the collection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see CopyTo.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see GetEnumerator.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.Count

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see Count.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IsSynchronized.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see SyncRoot.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast(Of TResult)()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType(Of TResult)()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

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

.NET Framework
Available since 1.1

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

Return to top
Show: