Freigeben über


PrinterSettings.PrinterResolutionCollection.Item-Eigenschaft

Ruft die PrinterResolution an einem angegebenen Index ab.

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

Syntax

'Declaration
Public Overridable ReadOnly Default Property Item ( _
    index As Integer _
) As PrinterResolution
'Usage
Dim instance As PrinterResolutionCollection
Dim index As Integer
Dim value As PrinterResolution

value = instance(index)
public virtual PrinterResolution this [
    int index
] { get; }
public:
virtual property PrinterResolution^ default [int] {
    PrinterResolution^ get (int index);
}
/** @property */
public PrinterResolution get_Item (int index)
JScript unterstützt die Verwendung von indizierten Eigenschaften, aber nicht die Deklaration von neuen indizierten Eigenschaften.

Parameter

Eigenschaftenwert

Die PrinterResolution am angegebenen Index.

Beispiel

' 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
// 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.

PrinterResolution pkResolution;
for (int i = 0; i < printDoc.PrinterSettings.PrinterResolutions.Count; i++){
    pkResolution = printDoc.PrinterSettings.PrinterResolutions[i];
    comboPrintResolution.Items.Add(pkResolution);
}
// 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.
PrinterResolution^ pkResolution;
for ( int i = 0; i < printDoc->PrinterSettings->PrinterResolutions->Count; i++ )
{
   pkResolution = printDoc->PrinterSettings->PrinterResolutions[ i ];
   comboPrintResolution->Items->Add( pkResolution );
}
// 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.
PrinterResolution pkResolution;
for (int i = 0; i < printDoc.get_PrinterSettings().
    get_PrinterResolutions().get_Count(); i++) {
    pkResolution = printDoc.get_PrinterSettings().
        get_PrinterResolutions().get_Item(i);
    comboPrintResolution.get_Items().Add(pkResolution);
}

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

PrinterSettings.PrinterResolutionCollection-Klasse
PrinterSettings.PrinterResolutionCollection-Member
System.Drawing.Printing-Namespace
PrinterResolution-Klasse