PrinterSettings.PrinterResolutions プロパティ

定義

プリンターでサポートされている解像度をすべて取得します。Gets all the resolutions that are supported by this printer.

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

プロパティ値

プリンターでサポートされている解像度を表す PrinterSettings.PrinterResolutionCollectionA PrinterSettings.PrinterResolutionCollection that represents the resolutions that are supported by this printer.

次のコード例ではcomboPrintResolution 、コンボボックスにサポートされている解像度を設定します。The following code example populates the comboPrintResolution combo box with the supported resolutions. この例では、 PrintDocumentというprintDoc名前の変数が存在し、特定のコンボボックスが存在している必要があります。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.
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

注釈

PrinterSettings.PrinterResolutionCollectionPrinterResolutionPrinterResolution.Kindプロパティでサポートされているプリンター解像度を表すインスタンスが含まれPrinterResolutionKindます。これには、値の1つが含まれます。The PrinterSettings.PrinterResolutionCollection contains PrinterResolution instances that represent the printer resolutions supported through the PrinterResolution.Kind property, which contains one of the PrinterResolutionKind values.

通常、 PageSettings.PrinterResolutionプロパティを使用してページの給紙方法を、 PrinterResolutionsコレクションでPrinterResolution使用できる有効なに設定します。Typically, you set a page's paper source through the PageSettings.PrinterResolution property to a valid PrinterResolution available through the PrinterResolutions collection.

PrinterResolutionKind X Yの場合は、プロパティとプロパティを使用して、それぞれ水平方向および垂直方向のカスタムプリンター解像度を決定します。 CustomIf PrinterResolutionKind is Custom, then use the X and Y properties to determine the custom printer resolution in the horizontal and vertical directions, respectively.

適用対象

こちらもご覧ください