PrinterSettings.PaperSizeCollection クラスとは? わかりやすく解説

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

PrinterSettings.PaperSizeCollection クラス

PaperSize オブジェクトコレクション格納します

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

Public Class PaperSizeCollection
    Implements ICollection, IEnumerable
Dim instance As PaperSizeCollection
public class PaperSizeCollection : ICollection,
 IEnumerable
public ref class PaperSizeCollection : ICollection,
 IEnumerable
public class PaperSizeCollection implements
 ICollection, IEnumerable
public class PaperSizeCollection implements
 ICollection, IEnumerable
解説解説
使用例使用例

プリンタサポートされている用紙サイズ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.Object
  System.Drawing.Printing.PrinterSettings.PaperSizeCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PrinterSettings.PaperSizeCollection メンバ
System.Drawing.Printing 名前空間
PaperSize クラス
PrinterSettings.PaperSizes プロパティ
PrinterSettings.InstalledPrinters プロパティ
PrinterSettings.PaperSources プロパティ
PrinterSettings.PrinterResolutions プロパティ
ListControl.DisplayMember



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

辞書ショートカット

すべての辞書の索引

「PrinterSettings.PaperSizeCollection クラス」の関連用語

PrinterSettings.PaperSizeCollection クラスのお隣キーワード
検索ランキング

   

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



PrinterSettings.PaperSizeCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS