Muokkaa

Jaa


Metafile Constructors

Definition

Initializes a new instance of the Metafile class.

Overloads

Metafile(Stream)

Initializes a new instance of the Metafile class from the specified data stream.

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

Metafile(String, IntPtr, EmfType, String)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can be added, as well.

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string can be provided to name the file.

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string can be provided to name the file.

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(Stream, IntPtr, EmfType, String)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile. Also, a string that contains a descriptive name for the new Metafile can be added.

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, String)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure. A descriptive string can also be added.

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, String)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure. A descriptive string can also be added.

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string that contains a descriptive name for the new Metafile can be added.

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string that contains a descriptive name for the new Metafile can be added.

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can also be added.

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can also be added.

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

Metafile(String, IntPtr, RectangleF)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and a RectangleF structure that represents the rectangle that bounds the new Metafile.

Metafile(String)

Initializes a new instance of the Metafile class from the specified file name.

Metafile(IntPtr, Boolean)

Initializes a new instance of the Metafile class from the specified handle.

Metafile(IntPtr, EmfType)

Initializes a new instance of the Metafile class from the specified handle to a device context and an EmfType enumeration that specifies the format of the Metafile.

Metafile(IntPtr, WmfPlaceableFileHeader)

Initializes a new instance of the Metafile class from the specified handle and a WmfPlaceableFileHeader.

Metafile(IntPtr, Rectangle)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle.

Metafile(IntPtr, RectangleF)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle.

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(String, IntPtr)

Initializes a new instance of the Metafile class with the specified file name.

Metafile(IntPtr, EmfType, String)

Initializes a new instance of the Metafile class from the specified handle to a device context and an EmfType enumeration that specifies the format of the Metafile. A string can be supplied to name the file.

Metafile(Stream, IntPtr)

Initializes a new instance of the Metafile class from the specified data stream.

Metafile(IntPtr, Rectangle, MetafileFrameUnit)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure.

Metafile(IntPtr, RectangleF, MetafileFrameUnit)

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure.

Metafile(Stream, IntPtr, EmfType)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(Stream, IntPtr, Rectangle)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and a Rectangle structure that represents the rectangle that bounds the new Metafile.

Metafile(Stream, IntPtr, RectangleF)

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and a RectangleF structure that represents the rectangle that bounds the new Metafile.

Metafile(String, IntPtr, EmfType)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.

Metafile(String, IntPtr, Rectangle)

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and a Rectangle structure that represents the rectangle that bounds the new Metafile.

Metafile(IntPtr, WmfPlaceableFileHeader, Boolean)

Initializes a new instance of the Metafile class from the specified handle and a WmfPlaceableFileHeader. Also, the deleteWmf parameter can be used to delete the handle when the metafile is deleted.

Metafile(Stream)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream.

public:
 Metafile(System::IO::Stream ^ stream);
public Metafile (System.IO.Stream stream);
new System.Drawing.Imaging.Metafile : System.IO.Stream -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream)

Parameters

stream
Stream

The Stream from which to create the new Metafile.

Exceptions

stream is null.

Applies to

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(String, IntPtr, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can be added, as well.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, type As EmfType, description As String)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle structure that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string can be provided to name the file.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ desc);
public Metafile (IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? desc);
public Metafile (IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string desc);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType, desc As String)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

desc
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string can be provided to name the file.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType, description As String)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(Stream, IntPtr, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile. Also, a string that contains a descriptive name for the new Metafile can be added.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, type As EmfType, description As String)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure. A descriptive string can also be added.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::String ^ description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, string? description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, string description);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * string -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, description As String)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure. A descriptive string can also be added.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::String ^ desc);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, string? desc);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, string desc);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * string -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, desc As String)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

desc
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string that contains a descriptive name for the new Metafile can be added.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType, description As String)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A string that contains a descriptive name for the new Metafile can be added.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType, description As String)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can also be added.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType, description As String)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a RectangleF structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile. A descriptive string can also be added.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type, System::String ^ description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string? description);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type, string description);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType, description As String)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A String that contains a descriptive name for the new Metafile.

Applies to

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, a Rectangle structure that represents the rectangle that bounds the new Metafile, and the supplied unit of measure.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(String, IntPtr, RectangleF)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and a RectangleF structure that represents the rectangle that bounds the new Metafile.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::RectangleF frameRect);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.RectangleF frameRect);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.RectangleF -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As RectangleF)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified file name.

public:
 Metafile(System::String ^ filename);
public Metafile (string filename);
new System.Drawing.Imaging.Metafile : string -> System.Drawing.Imaging.Metafile
Public Sub New (filename As String)

Parameters

filename
String

A String that represents the file name from which to create the new Metafile.

Examples

The following code example demonstrates how to create and use a Metafile.


using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;

// for Marshal.Copy
using System.Runtime.InteropServices; 

public class Form1 : Form
{
    private Metafile metafile1;
    private Graphics.EnumerateMetafileProc metafileDelegate;
    private Point destPoint;
    public Form1()
    {
        metafile1 = new Metafile(@"C:\Test.wmf");
        metafileDelegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
        destPoint = new Point(20, 10);
    }
    protected override void OnPaint(PaintEventArgs e)
    {
        e.Graphics.EnumerateMetafile(metafile1, destPoint, metafileDelegate);
    }
    private bool MetafileCallback(
       EmfPlusRecordType recordType,
       int flags,
       int dataSize,
       IntPtr data,
       PlayRecordCallback callbackData)
    {
        byte[] dataArray = null;
        if (data != IntPtr.Zero)
        {
            // Copy the unmanaged record to a managed byte buffer 
            // that can be used by PlayRecord.
            dataArray = new byte[dataSize];
            Marshal.Copy(data, dataArray, 0, dataSize);
        }

        metafile1.PlayRecord(recordType, flags, dataSize, dataArray);

        return true;
    }

    static void Main()
    {
        Application.Run(new Form1());
    }
}
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Windows.Forms
' for Marshal.Copy
Imports System.Runtime.InteropServices


Public Class Form1
    Inherits Form
    Private metafile1 As Metafile
    Private metafileDelegate As Graphics.EnumerateMetafileProc
    Private destPoint As Point
    
    Public Sub New() 
        metafile1 = New Metafile("C:\test.wmf")
        metafileDelegate = New Graphics.EnumerateMetafileProc(AddressOf MetafileCallback)
        destPoint = New Point(20, 10)
    
    End Sub
    
    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) 
        e.Graphics.EnumerateMetafile(metafile1, destPoint, metafileDelegate)
    
    End Sub
    
    Private Function MetafileCallback(ByVal recordType As _
        EmfPlusRecordType, ByVal flags As Integer, ByVal dataSize As Integer, _
        ByVal data As IntPtr, ByVal callbackData As PlayRecordCallback) As Boolean

        Dim dataArray As Byte() = Nothing
        If data <> IntPtr.Zero Then

            ' Copy the unmanaged record to a managed byte buffer 
            ' that can be used by PlayRecord.
            dataArray = New Byte(dataSize) {}
            Marshal.Copy(data, dataArray, 0, dataSize)
        End If

        metafile1.PlayRecord(recordType, flags, dataSize, dataArray)
        Return True

    End Function
    
    Shared Sub Main() 
        Application.Run(New Form1())
    End Sub

End Class

Applies to

Metafile(IntPtr, Boolean)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified handle.

public:
 Metafile(IntPtr henhmetafile, bool deleteEmf);
public Metafile (IntPtr henhmetafile, bool deleteEmf);
new System.Drawing.Imaging.Metafile : nativeint * bool -> System.Drawing.Imaging.Metafile
Public Sub New (henhmetafile As IntPtr, deleteEmf As Boolean)

Parameters

henhmetafile
IntPtr

nativeint

A handle to an enhanced metafile.

deleteEmf
Boolean

true to delete the enhanced metafile handle when the Metafile is deleted; otherwise, false.

Applies to

Metafile(IntPtr, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified handle to a device context and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Imaging::EmfType emfType);
public Metafile (IntPtr referenceHdc, System.Drawing.Imaging.EmfType emfType);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, emfType As EmfType)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

emfType
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(IntPtr, WmfPlaceableFileHeader)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified handle and a WmfPlaceableFileHeader.

public:
 Metafile(IntPtr hmetafile, System::Drawing::Imaging::WmfPlaceableFileHeader ^ wmfHeader);
public Metafile (IntPtr hmetafile, System.Drawing.Imaging.WmfPlaceableFileHeader wmfHeader);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Imaging.WmfPlaceableFileHeader -> System.Drawing.Imaging.Metafile
Public Sub New (hmetafile As IntPtr, wmfHeader As WmfPlaceableFileHeader)

Parameters

hmetafile
IntPtr

nativeint

A windows handle to a Metafile.

Applies to

Metafile(IntPtr, Rectangle)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Rectangle frameRect);
public Metafile (IntPtr referenceHdc, System.Drawing.Rectangle frameRect);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Rectangle -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As Rectangle)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(IntPtr, RectangleF)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::RectangleF frameRect);
public Metafile (IntPtr referenceHdc, System.Drawing.RectangleF frameRect);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.RectangleF -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As RectangleF)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit, System::Drawing::Imaging::EmfType type);
public Metafile (IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit, type As EmfType)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(String, IntPtr)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc);
public Metafile (string fileName, IntPtr referenceHdc);
new System.Drawing.Imaging.Metafile : string * nativeint -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

Applies to

Metafile(IntPtr, EmfType, String)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified handle to a device context and an EmfType enumeration that specifies the format of the Metafile. A string can be supplied to name the file.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Imaging::EmfType emfType, System::String ^ description);
public Metafile (IntPtr referenceHdc, System.Drawing.Imaging.EmfType emfType, string? description);
public Metafile (IntPtr referenceHdc, System.Drawing.Imaging.EmfType emfType, string description);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Imaging.EmfType * string -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, emfType As EmfType, description As String)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

emfType
EmfType

An EmfType that specifies the format of the Metafile.

description
String

A descriptive name for the new Metafile.

Applies to

Metafile(Stream, IntPtr)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

Applies to

Metafile(IntPtr, Rectangle, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::Rectangle frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (IntPtr referenceHdc, System.Drawing.Rectangle frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Rectangle * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As Rectangle, frameUnit As MetafileFrameUnit)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(IntPtr, RectangleF, MetafileFrameUnit)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified device context, bounded by the specified rectangle that uses the supplied unit of measure.

public:
 Metafile(IntPtr referenceHdc, System::Drawing::RectangleF frameRect, System::Drawing::Imaging::MetafileFrameUnit frameUnit);
public Metafile (IntPtr referenceHdc, System.Drawing.RectangleF frameRect, System.Drawing.Imaging.MetafileFrameUnit frameUnit);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.RectangleF * System.Drawing.Imaging.MetafileFrameUnit -> System.Drawing.Imaging.Metafile
Public Sub New (referenceHdc As IntPtr, frameRect As RectangleF, frameUnit As MetafileFrameUnit)

Parameters

referenceHdc
IntPtr

nativeint

The handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

frameUnit
MetafileFrameUnit

A MetafileFrameUnit that specifies the unit of measure for frameRect.

Applies to

Metafile(Stream, IntPtr, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Imaging::EmfType type);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, type As EmfType)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(Stream, IntPtr, Rectangle)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and a Rectangle structure that represents the rectangle that bounds the new Metafile.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::Rectangle frameRect);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.Rectangle frameRect);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.Rectangle -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As Rectangle)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(Stream, IntPtr, RectangleF)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and a RectangleF structure that represents the rectangle that bounds the new Metafile.

public:
 Metafile(System::IO::Stream ^ stream, IntPtr referenceHdc, System::Drawing::RectangleF frameRect);
public Metafile (System.IO.Stream stream, IntPtr referenceHdc, System.Drawing.RectangleF frameRect);
new System.Drawing.Imaging.Metafile : System.IO.Stream * nativeint * System.Drawing.RectangleF -> System.Drawing.Imaging.Metafile
Public Sub New (stream As Stream, referenceHdc As IntPtr, frameRect As RectangleF)

Parameters

stream
Stream

A Stream that contains the data for this Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
RectangleF

A RectangleF that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(String, IntPtr, EmfType)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Imaging::EmfType type);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Imaging.EmfType type);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Imaging.EmfType -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, type As EmfType)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

type
EmfType

An EmfType that specifies the format of the Metafile.

Applies to

Metafile(String, IntPtr, Rectangle)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class with the specified file name, a Windows handle to a device context, and a Rectangle structure that represents the rectangle that bounds the new Metafile.

public:
 Metafile(System::String ^ fileName, IntPtr referenceHdc, System::Drawing::Rectangle frameRect);
public Metafile (string fileName, IntPtr referenceHdc, System.Drawing.Rectangle frameRect);
new System.Drawing.Imaging.Metafile : string * nativeint * System.Drawing.Rectangle -> System.Drawing.Imaging.Metafile
Public Sub New (fileName As String, referenceHdc As IntPtr, frameRect As Rectangle)

Parameters

fileName
String

A String that represents the file name of the new Metafile.

referenceHdc
IntPtr

nativeint

A Windows handle to a device context.

frameRect
Rectangle

A Rectangle that represents the rectangle that bounds the new Metafile.

Applies to

Metafile(IntPtr, WmfPlaceableFileHeader, Boolean)

Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs
Source:
Metafile.cs

Initializes a new instance of the Metafile class from the specified handle and a WmfPlaceableFileHeader. Also, the deleteWmf parameter can be used to delete the handle when the metafile is deleted.

public:
 Metafile(IntPtr hmetafile, System::Drawing::Imaging::WmfPlaceableFileHeader ^ wmfHeader, bool deleteWmf);
public Metafile (IntPtr hmetafile, System.Drawing.Imaging.WmfPlaceableFileHeader wmfHeader, bool deleteWmf);
new System.Drawing.Imaging.Metafile : nativeint * System.Drawing.Imaging.WmfPlaceableFileHeader * bool -> System.Drawing.Imaging.Metafile
Public Sub New (hmetafile As IntPtr, wmfHeader As WmfPlaceableFileHeader, deleteWmf As Boolean)

Parameters

hmetafile
IntPtr

nativeint

A windows handle to a Metafile.

deleteWmf
Boolean

true to delete the handle to the new Metafile when the Metafile is deleted; otherwise, false.

Applies to