Aracılığıyla paylaş


PrinterSettings.PrinterResolutionCollection.Item[Int32] Özellik

Tanım

Belirtilen dizinde alır PrinterResolution .

public:
 virtual property System::Drawing::Printing::PrinterResolution ^ default[int] { System::Drawing::Printing::PrinterResolution ^ get(int index); };
public virtual System.Drawing.Printing.PrinterResolution this[int index] { get; }
member this.Item(int) : System.Drawing.Printing.PrinterResolution
Default Public Overridable ReadOnly Property Item(index As Integer) As PrinterResolution

Parametreler

index
Int32

Alınacak dizini PrinterResolution .

Özellik Değeri

PrinterResolution Belirtilen dizindeki .

Örnekler

Aşağıdaki kod örneği birleşik giriş kutusunu desteklenen çözünürlüklerle doldurur comboPrintResolution . Örnek, adlı printDoc bir değişkenin mevcut olmasını ve belirli bir PrintDocument birleşik giriş kutusunun mevcut olmasını gerektirir.

// 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.
Dim pkResolution As PrinterResolution
For i = 0 to printDoc.PrinterSettings.PrinterResolutions.Count - 1
    pkResolution = printDoc.PrinterSettings.PrinterResolutions.Item(i)
    comboPrintResolution.Items.Add(pkResolution)
Next

Şunlara uygulanır

Ayrıca bkz.