Export (0) Print
Expand All

PageSettings Class

Specifies settings that apply to a single, printed page.

Namespace: System.Drawing.Printing
Assembly: System.Drawing (in system.drawing.dll)

'Declaration
<SerializableAttribute> _
Public Class PageSettings
	Implements ICloneable
'Usage
Dim instance As PageSettings

/** @attribute SerializableAttribute() */ 
public class PageSettings implements ICloneable
SerializableAttribute 
public class PageSettings implements ICloneable
Not applicable.

The PageSettings class is used to specify settings that modify the way a page will be printed. Typically, you set default settings for all pages to be printed through the PrintDocument.DefaultPageSettings property. To specify settings on a page-by-page basis, handle the PrintDocument.PrintPage or PrintDocument.QueryPageSettings event and modify the PageSettings argument included in the PrintPageEventArgs or QueryPageSettingsEventArgs, respectively.

For more information about handling PrintDocument events, see the PrintDocument class overview. For more information about printing, see the System.Drawing.Printing namespace overview.

The following example demonstrates handling the PrintPage event and checking the PageSettings argument of PrintPageEventArgs. To use this code, add a PrintDocument component named PrintDocument1 to a Windows Form and associate its PrintPage event with the printDocument1_PrintPage method in the example.

System.Object
  System.Drawing.Printing.PageSettings

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft