PrinterSettings.PrinterResolutions Właściwość
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Pobiera wszystkie rozdzielczości obsługiwane przez tę drukarkę.
public:
property System::Drawing::Printing::PrinterSettings::PrinterResolutionCollection ^ PrinterResolutions { System::Drawing::Printing::PrinterSettings::PrinterResolutionCollection ^ get(); };
public System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection PrinterResolutions { get; }
member this.PrinterResolutions : System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection
Public ReadOnly Property PrinterResolutions As PrinterSettings.PrinterResolutionCollection
Element PrinterSettings.PrinterResolutionCollection reprezentujący rozdzielczości obsługiwane przez tę drukarkę.
Poniższy przykład kodu wypełnia comboPrintResolution
pole kombi obsługiwanymi rozwiązaniami. Przykład wymaga, aby zmienna PrintDocument o nazwie printDoc
istnieje i że istnieje określone pole kombi.
// 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
PrinterResolution Zawiera PrinterSettings.PrinterResolutionCollection wystąpienia reprezentujące rozdzielczości drukarki obsługiwane za pośrednictwem PrinterResolution.Kind właściwości , która zawiera jedną z PrinterResolutionKind wartości.
Zazwyczaj źródło papieru strony jest ustawiane za pośrednictwem PageSettings.PrinterResolution właściwości na prawidłowe PrinterResolution dostępne za pośrednictwem PrinterResolutions kolekcji.
Jeśli PrinterResolutionKind parametr ma Custom
wartość , użyj X właściwości i Y , aby określić rozdzielczość drukarki niestandardowej odpowiednio w kierunkach poziomych i pionowych.
Produkt | Wersje |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Opinia o produkcie .NET
.NET to projekt typu open source. Wybierz link, aby przekazać opinię: