PrinterSettings.PaperSizes プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PrinterSettings.PaperSizes プロパティの意味・解説 

PrinterSettings.PaperSizes プロパティ

プリンタサポートされている用紙サイズ取得します

名前空間: System.Drawing.Printing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public ReadOnly Property
 PaperSizes As PaperSizeCollection
Dim instance As PrinterSettings
Dim value As PaperSizeCollection

value = instance.PaperSizes
public PaperSizeCollection PaperSizes { get;
 }
public:
property PaperSizeCollection^ PaperSizes {
    PaperSizeCollection^ get ();
}
/** @property */
public PaperSizeCollection get_PaperSizes ()
public function get PaperSizes
 () : PaperSizeCollection

プロパティ
プリンタサポートされている用紙サイズを表す PrinterSettings.PaperSizeCollection。

解説解説
使用例使用例

プリンタサポートされている用紙サイズ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);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PrinterSettings クラス
PrinterSettings メンバ
System.Drawing.Printing 名前空間
PaperSize クラス
PrinterSettings.PaperSizeCollection
PrinterSettings.InstalledPrinters プロパティ
PaperSources
PrinterResolutions
ListControl.DisplayMember


このページでは「.NET Framework クラス ライブラリ リファレンス」からPrinterSettings.PaperSizes プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からPrinterSettings.PaperSizes プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からPrinterSettings.PaperSizes プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「PrinterSettings.PaperSizes プロパティ」の関連用語

PrinterSettings.PaperSizes プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PrinterSettings.PaperSizes プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS