PrinterSettings.PaperSources プロパティ
名前空間: System.Drawing.Printing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
プロパティ値
プリンタで使用できる用紙トレイを表す PrinterSettings.PaperSourceCollection。

PrinterSettings.PaperSourceCollection には、PaperSource.Kind プロパティを通じて用紙トレイを表す PaperSource インスタンスが格納されていて、PaperSourceKind 値のいずれかが含まれています。
通常、ページの給紙方法は、PageSettings.PaperSource プロパティを使用して、PaperSources コレクションで取得できる有効な PaperSource に設定します。

プリンタでサポートされている給紙方法を comboPaperSource コンボ ボックスに設定するコード例を次に示します。SourceName は、コンボ ボックスの DisplayMember プロパティを通じて追加される項目の表示文字列を提供するプロパティとして識別されます。この例では、printDoc という名前の PrintDocument 変数と、特定のコンボ ボックスが存在することが必要です。
' Add list of paper sources found on the printer to the combo box. ' The DisplayMember property is used to identify the property that will provide the display string. comboPaperSource.DisplayMember = "SourceName" Dim pkSource As PaperSource For i = 0 to printDoc.PrinterSettings.PaperSources.Count - 1 pkSource = printDoc.PrinterSettings.PaperSources.Item(i) comboPaperSource.Items.Add(pkSource) Next
// Add list of paper sources found on the printer to the combo box. // The DisplayMember property is used to identify the property that will provide the display string. comboPaperSource.DisplayMember="SourceName"; PaperSource pkSource; for (int i = 0; i < printDoc.PrinterSettings.PaperSources.Count; i++){ pkSource = printDoc.PrinterSettings.PaperSources[i]; comboPaperSource.Items.Add(pkSource); }
// Add list of paper sources found on the printer to the combo box. // The DisplayMember property is used to identify the property that will provide the display String*. comboPaperSource->DisplayMember = "SourceName"; PaperSource^ pkSource; for ( int i = 0; i < printDoc->PrinterSettings->PaperSources->Count; i++ ) { pkSource = printDoc->PrinterSettings->PaperSources[ i ]; comboPaperSource->Items->Add( pkSource ); }
// Add list of paper sources found on the printer to the combo box. // The DisplayMember property is used to identify the property that // will provide the display string. comboPaperSource.set_DisplayMember("SourceName"); PaperSource pkSource; for (int i = 0; i < printDoc.get_PrinterSettings().get_PaperSources(). get_Count(); i++) { pkSource = printDoc.get_PrinterSettings().get_PaperSources(). get_Item(i); comboPaperSource.get_Items().Add(pkSource); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

- PrinterSettings.PaperSources プロパティのページへのリンク