PrinterSettings.CreateMeasurementGraphics Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Graphics that contains printer information.
Overloads
CreateMeasurementGraphics(PageSettings) |
Returns a Graphics that contains printer information associated with the specified PageSettings. |
CreateMeasurementGraphics(PageSettings, Boolean) |
Creates a Graphics associated with the specified page settings and optionally specifying the origin at the margins. |
CreateMeasurementGraphics() |
Returns a Graphics that contains printer information that is useful when creating a PrintDocument. |
CreateMeasurementGraphics(Boolean) |
Returns a Graphics that contains printer information, optionally specifying the origin at the margins. |
CreateMeasurementGraphics(PageSettings)
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Returns a Graphics that contains printer information associated with the specified PageSettings.
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(System::Drawing::Printing::PageSettings ^ pageSettings);
public System.Drawing.Graphics CreateMeasurementGraphics (System.Drawing.Printing.PageSettings pageSettings);
member this.CreateMeasurementGraphics : System.Drawing.Printing.PageSettings -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (pageSettings As PageSettings) As Graphics
Parameters
- pageSettings
- PageSettings
The PageSettings to retrieve a graphics object for.
Returns
A Graphics that contains printer information from the PageSettings.
Remarks
With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
Applies to
CreateMeasurementGraphics(PageSettings, Boolean)
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Creates a Graphics associated with the specified page settings and optionally specifying the origin at the margins.
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(System::Drawing::Printing::PageSettings ^ pageSettings, bool honorOriginAtMargins);
public System.Drawing.Graphics CreateMeasurementGraphics (System.Drawing.Printing.PageSettings pageSettings, bool honorOriginAtMargins);
member this.CreateMeasurementGraphics : System.Drawing.Printing.PageSettings * bool -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (pageSettings As PageSettings, honorOriginAtMargins As Boolean) As Graphics
Parameters
- pageSettings
- PageSettings
The PageSettings to retrieve a Graphics object for.
- honorOriginAtMargins
- Boolean
true
to specify the origin at the margins; otherwise, false
.
Returns
A Graphics that contains printer information from the PageSettings.
Remarks
The CreateMeasurementGraphics method allows you to obtain a Graphics for the printer without creating a print job. Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
Applies to
CreateMeasurementGraphics()
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Returns a Graphics that contains printer information that is useful when creating a PrintDocument.
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics();
public System.Drawing.Graphics CreateMeasurementGraphics ();
member this.CreateMeasurementGraphics : unit -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics () As Graphics
Returns
A Graphics that contains information from a printer.
Exceptions
The printer named in the PrinterName property does not exist.
Remarks
With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. You can use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
See also
Applies to
CreateMeasurementGraphics(Boolean)
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Returns a Graphics that contains printer information, optionally specifying the origin at the margins.
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(bool honorOriginAtMargins);
public System.Drawing.Graphics CreateMeasurementGraphics (bool honorOriginAtMargins);
member this.CreateMeasurementGraphics : bool -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (honorOriginAtMargins As Boolean) As Graphics
Parameters
- honorOriginAtMargins
- Boolean
true
to indicate the origin at the margins; otherwise, false
.
Returns
A Graphics that contains printer information from the PageSettings.
Remarks
With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.