System.Windows.Forms.PageSetupDialog Class

Enables users to change page-related print settings, including margins and paper orientation. This class cannot be inherited.

See Also: PageSetupDialog Members


public sealed class PageSetupDialog : CommonDialog


The System.Windows.Forms.PageSetupDialog dialog box modifies the System.Drawing.Printing.PageSettings and System.Drawing.Printing.PrinterSettings information for a given PageSetupDialog.Document. The user can enable sections of the dialog box to manipulate printing and margins; paper orientation, size, and source; and to show Help and network buttons. The PageSetupDialog.MinMargins property defines the minimum margins a user can select.

When you create an instance of the System.Windows.Forms.PageSetupDialog class, the read/write properties are set to initial values. For a list of these values, see the PageSetupDialog.#ctor constructor.

Because a System.Windows.Forms.PageSetupDialog needs page settings to display, you need to set the PrintDialog.Document, PrintDialog.PrinterSettings, or PageSetupDialog.PageSettings property before calling CommonDialog.ShowDialog; otherwise, an exception will occur.


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0,