PrinterSettings.PrinterResolutionCollection クラス

定義

PrinterResolution オブジェクトのコレクションを含んでいます。

public: ref class PrinterSettings::PrinterResolutionCollection : System::Collections::ICollection
public class PrinterSettings.PrinterResolutionCollection : System.Collections.ICollection
type PrinterSettings.PrinterResolutionCollection = class
    interface ICollection
    interface IEnumerable
Public Class PrinterSettings.PrinterResolutionCollection
Implements ICollection
継承
PrinterSettings.PrinterResolutionCollection
実装

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

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

通常、 プロパティを使用してプリンターの解像度を PageSettings.PrinterResolution 、コレクションから使用できる有効な PrinterResolution インスタンスに PrinterResolutions 設定します。

が の場合PrinterResolutionKindは、 X プロパティと Y プロパティを使用して、それぞれ水平方向と垂直方向のカスタム プリンター解像度を決定Customします。

コンストラクター

PrinterSettings.PrinterResolutionCollection(PrinterResolution[])

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

プロパティ

Count

コレクション内の使用できるプリンター解像度の数を取得します。

Item[Int32]

指定したインデックスにある PrinterResolution を取得します。

メソッド

Add(PrinterResolution)

PrinterResolution をコレクションの末尾に追加します。

CopyTo(PrinterResolution[], Int32)

指定したインデックスを開始位置として、指定した配列に現在の PrinterSettings.PrinterResolutionCollection の内容をコピーします。

Equals(Object)

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

(継承元 Object)
GetEnumerator()

このコレクションを反復処理できる列挙子を返します。

GetHashCode()

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

(継承元 Object)
GetType()

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

(継承元 Object)
MemberwiseClone()

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

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

ICollection.CopyTo(Array, Int32)

このメンバーの詳細については、「CopyTo(Array, Int32)」をご覧ください。

ICollection.Count

このメンバーの詳細については、「Count」をご覧ください。

ICollection.IsSynchronized

このメンバーの詳細については、「IsSynchronized」をご覧ください。

ICollection.SyncRoot

このメンバーの詳細については、「SyncRoot」をご覧ください。

IEnumerable.GetEnumerator()

このメンバーの詳細については、「GetEnumerator()」をご覧ください。

拡張メソッド

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

適用対象

こちらもご覧ください