PageSettings.PrinterResolution プロパティ
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As PageSettings Dim value As PrinterResolution value = instance.PrinterResolution instance.PrinterResolution = value
public: property PrinterResolution^ PrinterResolution { PrinterResolution^ get (); void set (PrinterResolution^ value); }
/** @property */ public PrinterResolution get_PrinterResolution () /** @property */ public void set_PrinterResolution (PrinterResolution value)
public function get PrinterResolution () : PrinterResolution public function set PrinterResolution (value : PrinterResolution)
ページのプリンタ解像度を指定する PrinterResolution。既定値は、プリンタの既定の解像度です。


PrinterResolution は、PrinterResolutionKind 値の 1 つが格納されている PrinterResolution.Kind プロパティを使用してプリンタの給紙方法を表します。
ページの PrinterResolution プロパティを有効な PrinterResolution に設定します。これは、PrinterSettings.PrinterResolutions コレクションから取得できます。

comboPrintResolution コンボ ボックスで選択されている解像度に基づいたプリンタの解像度を含む、ドキュメントの既定のページの 3 つのプロパティを設定し、Print メソッドを使用して文書を印刷するコード例を次に示します。この例では、printDoc という名前の PrintDocument 変数と、特定のコンボ ボックスが存在することが必要条件となっています。
Private Sub MyButtonPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyButtonPrint.Click ' Set the paper size based upon the selection in the combo box. If comboPaperSize.SelectedIndex <> -1 Then printDoc.DefaultPageSettings.PaperSize = _ printDoc.PrinterSettings.PaperSizes.Item(comboPaperSize.SelectedIndex) End If ' Set the paper source based upon the selection in the combo box. If comboPaperSource.SelectedIndex <> -1 Then printDoc.DefaultPageSettings.PaperSource = _ printDoc.PrinterSettings.PaperSources.Item(comboPaperSource.SelectedIndex) End If ' Set the printer resolution based upon the selection in the combo box. If comboPrintResolution.SelectedIndex <> -1 Then printDoc.DefaultPageSettings.PrinterResolution = _ printDoc.PrinterSettings.PrinterResolutions.Item(comboPrintResolution.SelectedIndex) End If ' Print the document with the specified paper size and source. printDoc.Print() End Sub
private void MyButtonPrint_Click(object sender, System.EventArgs e) { // Set the paper size based upon the selection in the combo box. if (comboPaperSize.SelectedIndex != -1) { printDoc.DefaultPageSettings.PaperSize = printDoc.PrinterSettings.PaperSizes[comboPaperSize.SelectedIndex]; } // Set the paper source based upon the selection in the combo box. if (comboPaperSource.SelectedIndex != -1) { printDoc.DefaultPageSettings.PaperSource = printDoc.PrinterSettings.PaperSources[comboPaperSource.SelectedIndex]; } // Set the printer resolution based upon the selection in the combo box. if (comboPrintResolution.SelectedIndex != -1) { printDoc.DefaultPageSettings.PrinterResolution= printDoc.PrinterSettings.PrinterResolutions[comboPrintResolution.SelectedIndex]; } // Print the document with the specified paper size, source, and print resolution. printDoc.Print(); }
private: void MyButtonPrint_Click( Object^ sender, System::EventArgs^ e ) { // Set the paper size based upon the selection in the combo box. if ( comboPaperSize->SelectedIndex != -1 ) { printDoc->DefaultPageSettings->PaperSize = printDoc->PrinterSettings->PaperSizes[ comboPaperSize->SelectedIndex ]; } // Set the paper source based upon the selection in the combo box. if ( comboPaperSource->SelectedIndex != -1 ) { printDoc->DefaultPageSettings->PaperSource = printDoc->PrinterSettings->PaperSources[ comboPaperSource->SelectedIndex ]; } // Set the printer resolution based upon the selection in the combo box. if ( comboPrintResolution->SelectedIndex != -1 ) { printDoc->DefaultPageSettings->PrinterResolution = printDoc->PrinterSettings->PrinterResolutions[ comboPrintResolution->SelectedIndex ]; } // Print the document with the specified paper size, source, and print resolution. printDoc->Print(); }
private void myButtonPrint_Click(Object sender, System.EventArgs e) { // Set the paper size based upon the selection in the combo box. if (comboPaperSize.get_SelectedIndex() != -1) { printDoc.get_DefaultPageSettings().set_PaperSize(printDoc. get_PrinterSettings().get_PaperSizes(). get_Item(comboPaperSize.get_SelectedIndex())); } // Set the paper source based upon the selection in the combo box. if (comboPaperSource.get_SelectedIndex() != -1) { printDoc.get_DefaultPageSettings().set_PaperSource(printDoc. get_PrinterSettings().get_PaperSources(). get_Item(comboPaperSource.get_SelectedIndex())); } // Set the printer resolution based upon the selection in the combo box. if (comboPrintResolution.get_SelectedIndex() != -1) { printDoc.get_DefaultPageSettings().set_PrinterResolution(printDoc. get_PrinterSettings().get_PrinterResolutions(). get_Item(comboPrintResolution.get_SelectedIndex())); } // Print the document with the specified paper size, source, // and print resolution. printDoc.Print(); } //myButtonPrint_Click

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


PageSettings クラス
PageSettings メンバ
System.Drawing.Printing 名前空間
PrinterResolution
PrinterResolution.Kind
PrinterResolutionKind
PrinterSettings.PrinterResolutions
Weblioに収録されているすべての辞書からPageSettings.PrinterResolution プロパティを検索する場合は、下記のリンクをクリックしてください。

- PageSettings.PrinterResolution プロパティのページへのリンク