Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft die PaperSource 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 PaperSource
'Usage
Dim instance As PaperSourceCollection
Dim index As Integer
Dim value As PaperSource
value = instance(index)
public virtual PaperSource this [
int index
] { get; }
public:
virtual property PaperSource^ default [int] {
PaperSource^ get (int index);
}
/** @property */
public PaperSource get_Item (int index)
JScript unterstützt die Verwendung von indizierten Eigenschaften, aber nicht die Deklaration von neuen indizierten Eigenschaften.
Parameter
- index
Der Index der abzurufenden PaperSource.
Eigenschaftenwert
Die PaperSource am angegebenen Index.
Beispiel
' Add list of paper sources found on the printer to the combo box.
' The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember = "SourceName"
Dim pkSource As PaperSource
For i = 0 to printDoc.PrinterSettings.PaperSources.Count - 1
pkSource = printDoc.PrinterSettings.PaperSources.Item(i)
comboPaperSource.Items.Add(pkSource)
Next
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember="SourceName";
PaperSource pkSource;
for (int i = 0; i < printDoc.PrinterSettings.PaperSources.Count; i++){
pkSource = printDoc.PrinterSettings.PaperSources[i];
comboPaperSource.Items.Add(pkSource);
}
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display String*.
comboPaperSource->DisplayMember = "SourceName";
PaperSource^ pkSource;
for ( int i = 0; i < printDoc->PrinterSettings->PaperSources->Count; i++ )
{
pkSource = printDoc->PrinterSettings->PaperSources[ i ];
comboPaperSource->Items->Add( pkSource );
}
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that
// will provide the display string.
comboPaperSource.set_DisplayMember("SourceName");
PaperSource pkSource;
for (int i = 0; i < printDoc.get_PrinterSettings().get_PaperSources().
get_Count(); i++) {
pkSource = printDoc.get_PrinterSettings().get_PaperSources().
get_Item(i);
comboPaperSource.get_Items().Add(pkSource);
}
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.PaperSourceCollection-Klasse
PrinterSettings.PaperSourceCollection-Member
System.Drawing.Printing-Namespace
PaperSource-Klasse