語言

Metafile 建構函式

定義

初始化 Metafile 類別的新執行個體。

多載

名稱 Description
Metafile(Stream)

從指定的資料流中初始化該類別的新實例 Metafile 。

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄、代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。

Metafile(String, IntPtr, EmfType, String)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、裝置上下文的Windows 句柄,以及指定 EmfType 格式的 Metafile 枚舉。 也可以加入描述字串。

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。

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

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。 可以提供一個字串來命名檔案。

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

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。 可以提供一個字串來命名檔案。

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

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。

Metafile(Stream, IntPtr, EmfType, String)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄,以及指定EmfType格式的 Metafile 枚舉。 此外,也可以加入包含新名稱 Metafile 的字串。

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

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。

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

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。 也可以加入描述字串。

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

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。

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

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。 也可以加入描述字串。

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

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 可以加入包含新名稱 Metafile 的字串。

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

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 可以加入包含新名稱 Metafile 的字串。

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

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 也可以加入描述字串。

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

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 也可以加入描述字串。

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

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType)

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄、代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。

Metafile(String, IntPtr, RectangleF)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的Windows handle,以及一個代表界定新 RectangleF 矩形的 Metafile 結構。

Metafile(String)

從指定的檔案名稱初始化該 Metafile 類別的新實例。

Metafile(IntPtr, Boolean)

從指定的句柄初始化該類別的新實例 Metafile 。

Metafile(IntPtr, EmfType)

初始化該類別的新實例 Metafile ,從指定的句柄到裝置上下文,並列 EmfType 舉指定格式 Metafile。

Metafile(IntPtr, WmfPlaceableFileHeader)

從指定的 handle 初始化一個新的類別實例Metafile。WmfPlaceableFileHeader

Metafile(IntPtr, Rectangle)

從指定的裝置上下文初始化該類別的新實例 Metafile ,該上下文由指定的矩形所界定。

Metafile(IntPtr, RectangleF)

從指定的裝置上下文初始化該類別的新實例 Metafile ,該上下文由指定的矩形所界定。

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType)

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。

Metafile(String, IntPtr)

初始化一個以指定檔案名稱的新 Metafile 類別實例。

Metafile(IntPtr, EmfType, String)

初始化該類別的新實例 Metafile ,從指定的句柄到裝置上下文,並列 EmfType 舉指定格式 Metafile。 可以提供一個字串來命名檔案。

Metafile(Stream, IntPtr)

從指定的資料流中初始化該類別的新實例 Metafile 。

Metafile(IntPtr, Rectangle, MetafileFrameUnit)

從指定的裝置上下文初始化一個新的類別實例 Metafile ,該類別由指定的矩形所界定,該矩形使用所提供的計量單位。

Metafile(IntPtr, RectangleF, MetafileFrameUnit)

從指定的裝置上下文初始化一個新的類別實例 Metafile ,該類別由指定的矩形所界定,該矩形使用所提供的計量單位。

Metafile(Stream, IntPtr, EmfType)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄,以及指定EmfType格式的 Metafile 枚舉。

Metafile(Stream, IntPtr, Rectangle)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄,以及代表界定新 Rectangle 矩形的 Metafile 結構。

Metafile(Stream, IntPtr, RectangleF)

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄,以及代表界定新 RectangleF 矩形的 Metafile 結構。

Metafile(String, IntPtr, EmfType)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、裝置上下文的Windows 句柄,以及指定 EmfType 格式的 Metafile 枚舉。

Metafile(String, IntPtr, Rectangle)

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的Windows handle,以及一個代表界定新 Rectangle 矩形的 Metafile 結構。

Metafile(IntPtr, WmfPlaceableFileHeader, Boolean)

從指定的 handle 初始化一個新的類別實例Metafile。WmfPlaceableFileHeader 此外, deleteWmf 當元檔案被刪除時,該參數也可用來刪除該句柄。

Metafile(Stream)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的資料流中初始化該類別的新實例 Metafile 。

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)

參數

stream
Stream

從中 Stream 創造新的 Metafile。

例外狀況

stream 是 null。

適用於

Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄、代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

Metafile(String, IntPtr, EmfType, String)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、裝置上下文的Windows 句柄,以及指定 EmfType 格式的 Metafile 枚舉。 也可以加入描述字串。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

Metafile(String, IntPtr, Rectangle, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

一個 Rectangle 表示新 Metafile邊界矩形的結構。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

Metafile(String, IntPtr, RectangleF, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。 可以提供一個字串來命名檔案。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

desc
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 Metafile。 可以提供一個字串來命名檔案。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(Stream, IntPtr, EmfType, String)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄,以及指定EmfType格式的 Metafile 枚舉。 此外,也可以加入包含新名稱 Metafile 的字串。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。 也可以加入描述字串。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的 Windows 句柄、一個代表新 RectangleF 矩形的 Metafile 結構,以及所提供的計量單位。 也可以加入描述字串。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

desc
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 可以加入包含新名稱 Metafile 的字串。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄、代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 可以加入包含新名稱 Metafile 的字串。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 也可以加入描述字串。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 RectangleF 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 Metafile 格式。 也可以加入描述字串。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

String A 包含新 Metafile的描述名稱。

適用於

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

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,指定檔名、一個指向裝置上下文的 Windows handle、一個代表新 Rectangle 矩形的 Metafile 結構、所提供的計量單位,以及一個 EmfType 枚舉,指定 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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(IntPtr, RectangleF, MetafileFrameUnit, EmfType)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(Stream, IntPtr, Rectangle, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄、代表新 Rectangle 矩形的 Metafile 結構,以及所提供的計量單位。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

Metafile(String, IntPtr, RectangleF)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的Windows handle,以及一個代表界定新 RectangleF 矩形的 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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

適用於

Metafile(String)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的檔案名稱初始化該 Metafile 類別的新實例。

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)

參數

filename
String

A String 代表用來建立新 Metafile.

範例

以下程式碼範例示範如何建立及使用 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

適用於

Metafile(IntPtr, Boolean)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的句柄初始化該類別的新實例 Metafile 。

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)

參數

henhmetafile
IntPtr

nativeint

一個強化版元檔案的帳號。

deleteEmf
Boolean

true 刪除 時 Metafile 刪除增強後繼檔的 handle;否則, false。

適用於

Metafile(IntPtr, EmfType)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化該類別的新實例 Metafile ,從指定的句柄到裝置上下文,並列 EmfType 舉指定格式 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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

emfType
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(IntPtr, WmfPlaceableFileHeader)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的 handle 初始化一個新的類別實例Metafile。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)

參數

hmetafile
IntPtr

nativeint

視窗的 handle 轉為 Metafile.

適用於

Metafile(IntPtr, Rectangle)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化該類別的新實例 Metafile ,該上下文由指定的矩形所界定。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

適用於

Metafile(IntPtr, RectangleF)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化該類別的新實例 Metafile ,該上下文由指定的矩形所界定。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

適用於

Metafile(IntPtr, Rectangle, MetafileFrameUnit, EmfType)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個 Metafile 新的類別實例,該實例由指定的矩形界定,該矩形使用所提供的計量單位,以及 EmfType 一個列舉指定格式 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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(String, IntPtr)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個以指定檔案名稱的新 Metafile 類別實例。

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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

適用於

Metafile(IntPtr, EmfType, String)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化該類別的新實例 Metafile ,從指定的句柄到裝置上下文,並列 EmfType 舉指定格式 Metafile。 可以提供一個字串來命名檔案。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

emfType
EmfType

一個 EmfType 指定 . 格式的 Metafile。

description
String

Metafile新 .

適用於

Metafile(Stream, IntPtr)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的資料流中初始化該類別的新實例 Metafile 。

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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

適用於

Metafile(IntPtr, Rectangle, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個新的類別實例 Metafile ,該類別由指定的矩形所界定,該矩形使用所提供的計量單位。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

Metafile(IntPtr, RectangleF, MetafileFrameUnit)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的裝置上下文初始化一個新的類別實例 Metafile ,該類別由指定的矩形所界定,該矩形使用所提供的計量單位。

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)

參數

referenceHdc
IntPtr

nativeint

裝置上下文的handle。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

frameUnit
MetafileFrameUnit

MetafileFrameUnit A 指定了 的frameRect度量單位。

適用於

Metafile(Stream, IntPtr, EmfType)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows柄,以及指定EmfType格式的 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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(Stream, IntPtr, Rectangle)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄,以及代表界定新 Rectangle 矩形的 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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

適用於

Metafile(Stream, IntPtr, RectangleF)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化指定資料流中Metafile類別的新實例、裝置上下文的Windows句柄,以及代表界定新 RectangleF 矩形的 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)

參數

stream
Stream

Stream A 包含此Metafile資料。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
RectangleF

A RectangleF 代表界定新 Metafile的矩形。

適用於

Metafile(String, IntPtr, EmfType)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、裝置上下文的Windows 句柄,以及指定 EmfType 格式的 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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

type
EmfType

一個 EmfType 指定 . 格式的 Metafile。

適用於

Metafile(String, IntPtr, Rectangle)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

初始化一個新的 Metafile 類別實例,包含指定的檔案名稱、一個裝置上下文的Windows handle,以及一個代表界定新 Rectangle 矩形的 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)

參數

fileName
String

A String 代表新檔 Metafile的檔名。

referenceHdc
IntPtr

nativeint

一個 Windows 的 handle 連接到裝置上下文。

frameRect
Rectangle

A Rectangle 代表界定新 Metafile的矩形。

適用於

Metafile(IntPtr, WmfPlaceableFileHeader, Boolean)

來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs
來源:
Metafile.cs

從指定的 handle 初始化一個新的類別實例Metafile。WmfPlaceableFileHeader 此外, deleteWmf 當元檔案被刪除時,該參數也可用來刪除該句柄。

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)

參數

hmetafile
IntPtr

nativeint

視窗的 handle 轉為 Metafile.

deleteWmf
Boolean

true刪除 時Metafile將 handle 刪除為新的Metafile;否則, false

適用於