PrinterSettings.PrinterResolutions プロパティ

定義

プリンターでサポートされている解像度をすべて取得します。

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.PrinterResolutionCollection

プリンターでサポートされている解像度を表す PrinterSettings.PrinterResolutionCollection

次のコード例では、サポートされている解像度を comboPrintResolution コンボ ボックスに設定します。 この例では、名前付 PrintDocument きの printDoc 変数が存在し、特定のコンボ ボックスが存在する必要があります。

// 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.PrinterResolutionCollectionPrinterResolution サポートされている PrinterResolution.Kind プリンターの解像度を表すインスタンスが含まれています。このインスタンスには、いずれかの値が PrinterResolutionKind 含まれています。

通常は、プロパティを通じてページの用紙ソースを PageSettings.PrinterResolution 、コレクションから使用できる有効な PrinterResolution 用紙ソースに PrinterResolutions 設定します。

ある場合PrinterResolutionKindCustom、プロパティをXY使用して、水平方向と垂直方向のカスタム プリンターの解像度をそれぞれ決定します。

適用対象

こちらもご覧ください