PrinterSettings.PaperSizeCollection クラス
アセンブリ: System.Drawing (system.drawing.dll 内)


PrinterSettings.PaperSizeCollection は、PaperSize.Kind プロパティによって用紙サイズを表す PaperSize インスタンスを格納します。このプロパティは、PaperKind 値のいずれかを格納します。
通常、PageSettings.PaperSize プロパティで、PaperSizes コレクションから使用できる有効な PaperSize インスタンスにページの用紙サイズを設定します。

プリンタでサポートされている用紙サイズを comboPaperSize コンボ ボックスに設定するコード例を次に示します。また、カスタム用紙サイズを作成して、コンボ ボックスに追加します。PaperName は、コンボ ボックスの DisplayMember プロパティを通じて追加される項目の表示文字列を提供するプロパティとして識別されます。この例では、printDoc という名前の PrintDocument 変数と、特定のコンボ ボックスが存在することが必要です。
' Add list of supported paper sizes found on the printer. ' The DisplayMember property is used to identify the property that will provide the display string. comboPaperSize.DisplayMember = "PaperName" Dim pkSize As PaperSize For i = 0 to printDoc.PrinterSettings.PaperSizes.Count - 1 pkSize = printDoc.PrinterSettings.PaperSizes.Item(i) comboPaperSize.Items.Add(pkSize) Next ' Create a PaperSize and specify the custom paper size through the constructor and add to combobox. Dim pkCustomSize1 As New PaperSize("Custom Paper Size", 100, 200) comboPaperSize.Items.Add(pkCustomSize1)
// Add list of supported paper sizes found on the printer. // The DisplayMember property is used to identify the property that will provide the display string. comboPaperSize.DisplayMember = "PaperName"; PaperSize pkSize; for (int i = 0; i < printDoc.PrinterSettings.PaperSizes.Count; i++){ pkSize = printDoc.PrinterSettings.PaperSizes[i]; comboPaperSize.Items.Add(pkSize); } // Create a PaperSize and specify the custom paper size through the constructor and add to combobox. PaperSize pkCustomSize1 = new PaperSize("First custom size", 100, 200); comboPaperSize.Items.Add(pkCustomSize1);
// Add list of supported paper sizes found on the printer. // The DisplayMember property is used to identify the property that will provide the display String*. comboPaperSize->DisplayMember = "PaperName"; PaperSize^ pkSize; for ( int i = 0; i < printDoc->PrinterSettings->PaperSizes->Count; i++ ) { pkSize = printDoc->PrinterSettings->PaperSizes[ i ]; comboPaperSize->Items->Add( pkSize ); } // Create a PaperSize and specify the custom paper size through the constructor and add to combobox. PaperSize^ pkCustomSize1 = gcnew PaperSize( "First custom size",100,200 ); comboPaperSize->Items->Add( pkCustomSize1 );
// Add list of supported paper sizes found on the printer. // The DisplayMember property is used to identify the property that // will provide the display string. comboPaperSize.set_DisplayMember("PaperName"); PaperSize pkSize; for (int i = 0; i < printDoc.get_PrinterSettings().get_PaperSizes(). get_Count(); i++) { pkSize = printDoc.get_PrinterSettings().get_PaperSizes(). get_Item(i); comboPaperSize.get_Items().Add(pkSize); } // Create a PaperSize and specify the custom paper size through // the constructor and add to combobox. PaperSize pkCustomSize1 = new PaperSize("First custom size", 100, 200); comboPaperSize.get_Items().Add(pkCustomSize1);

System.Drawing.Printing.PrinterSettings.PaperSizeCollection


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PrinterSettings.PaperSizeCollection コンストラクタ
アセンブリ: System.Drawing (system.drawing.dll 内)


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PrinterSettings.PaperSizeCollection プロパティ


名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.Count | このメンバの説明については、Count のトピックを参照してください。 |
![]() | System.Collections.ICollection.IsSynchronized | このメンバの説明については、IsSynchronized のトピックを参照してください。 |
![]() | System.Collections.ICollection.SyncRoot | このメンバの説明については、SyncRoot のトピックを参照してください。 |

PrinterSettings.PaperSizeCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | Add | コレクションの末尾に PrinterResolution を追加します。 |
![]() | CopyTo | 指定したインデックスを開始位置として、指定した配列に現在の PrinterSettings.PaperSizeCollection の内容をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetEnumerator | コレクションを反復処理できる列挙子を返します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | このメンバの説明については、CopyTo のトピックを参照してください。 |
![]() | System.Collections.IEnumerable.GetEnumerator | このメンバの説明については、GetEnumerator のトピックを参照してください。 |

PrinterSettings.PaperSizeCollection メンバ
PaperSize オブジェクトのコレクションを格納します。
PrinterSettings.PaperSizeCollection データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | Add | コレクションの末尾に PrinterResolution を追加します。 |
![]() | CopyTo | 指定したインデックスを開始位置として、指定した配列に現在の PrinterSettings.PaperSizeCollection の内容をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetEnumerator | コレクションを反復処理できる列挙子を返します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | このメンバの説明については、CopyTo のトピックを参照してください。 |
![]() | System.Collections.IEnumerable.GetEnumerator | このメンバの説明については、GetEnumerator のトピックを参照してください。 |
![]() | System.Collections.ICollection.Count | このメンバの説明については、Count のトピックを参照してください。 |
![]() | System.Collections.ICollection.IsSynchronized | このメンバの説明については、IsSynchronized のトピックを参照してください。 |
![]() | System.Collections.ICollection.SyncRoot | このメンバの説明については、SyncRoot のトピックを参照してください。 |

Weblioに収録されているすべての辞書からPrinterSettings.PaperSizeCollectionを検索する場合は、下記のリンクをクリックしてください。

- PrinterSettings.PaperSizeCollectionのページへのリンク