PrinterResolution クラス

定義

プリンターでサポートされる解像度を表します。

public ref class PrinterResolution
public class PrinterResolution
[System.Serializable]
public class PrinterResolution
type PrinterResolution = class
[<System.Serializable>]
type PrinterResolution = class
Public Class PrinterResolution
継承
PrinterResolution
属性

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

// 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

注釈

このクラスは、 プロパティと PageSettings.PrinterResolution プロパティによってPrinterSettings.PrinterResolutions使用され、プリンターで使用可能なプリンター解像度を取得し、ページの印刷解像度をそれぞれ設定します。

プロパティを Kind 使用して、プリンターの解像度の種類が PrinterResolutionKindCustomかどうかを判断します。 その場合は、 プロパティと Y プロパティをX使用して、水平方向と垂直方向のプリンター解像度をそれぞれ決定します。

印刷の詳細については、名前空間の概要に関するページを System.Drawing.Printing 参照してください。

コンストラクター

PrinterResolution()

PrinterResolution クラスの新しいインスタンスを初期化します。

プロパティ

Kind

プリンターの解像度を取得または設定します。

X

水平方向のプリンター解像度を 1 インチあたりのドット数 (dpi) で取得します。

Y

垂直方向のプリンター解像度を 1 インチあたりのドット数 (dpi) で取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

このメンバーは、ToString() メソッドをオーバーライドします。

適用対象

こちらもご覧ください