HwndSource 建構函式

定義

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

多載

HwndSource(HwndSourceParameters)

使用包含初始設定值的結構,初始化 HwndSource 類別的新執行個體。

HwndSource(Int32, Int32, Int32, Int32, Int32, String, IntPtr)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、名稱和父視窗,初始化 HwndSource 類別的新執行個體。

HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、寬度、高度、名稱和父視窗,初始化 HwndSource 類別的新執行個體。

HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr, Boolean)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、寬度、高度、名稱和父視窗,以及指定視窗是否自動調整大小,初始化 HwndSource 類別的新執行個體。

備註

重要

這個方法無法在網際網路安全性區域中使用。

HwndSource(HwndSourceParameters)

使用包含初始設定值的結構,初始化 HwndSource 類別的新執行個體。

public:
 HwndSource(System::Windows::Interop::HwndSourceParameters parameters);
[System.Security.SecurityCritical]
public HwndSource (System.Windows.Interop.HwndSourceParameters parameters);
public HwndSource (System.Windows.Interop.HwndSourceParameters parameters);
[<System.Security.SecurityCritical>]
new System.Windows.Interop.HwndSource : System.Windows.Interop.HwndSourceParameters -> System.Windows.Interop.HwndSource
new System.Windows.Interop.HwndSource : System.Windows.Interop.HwndSourceParameters -> System.Windows.Interop.HwndSource
Public Sub New (parameters As HwndSourceParameters)

參數

parameters
HwndSourceParameters

結構,包含建立視窗所需的參數。

屬性

備註

重要

這個方法無法在網際網路安全性區域中使用。

在某些情況下,此建構函式簽章可能更方便,因為預設結構包含一些適當的初始預設值。

重要

如果您使用這個簽章,請勿使用預設 HwndSourceParameters 建構函式來建構 HwndSourceParameters 值的結構 parameters 。 您必須使用 HwndSourceParameters 可讓您指定初始視窗名稱的建構函式。 如果您使用預設 HwndSourceParameters 建構函式並加以建立 HwndSource ,則不會顯示, HwndSource 因為初始視窗名稱是所表示 HWND 的建構需求。

適用於

HwndSource(Int32, Int32, Int32, Int32, Int32, String, IntPtr)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、名稱和父視窗,初始化 HwndSource 類別的新執行個體。

public:
 HwndSource(int classStyle, int style, int exStyle, int x, int y, System::String ^ name, IntPtr parent);
[System.Security.SecurityCritical]
public HwndSource (int classStyle, int style, int exStyle, int x, int y, string name, IntPtr parent);
public HwndSource (int classStyle, int style, int exStyle, int x, int y, string name, IntPtr parent);
[<System.Security.SecurityCritical>]
new System.Windows.Interop.HwndSource : int * int * int * int * int * string * nativeint -> System.Windows.Interop.HwndSource
new System.Windows.Interop.HwndSource : int * int * int * int * int * string * nativeint -> System.Windows.Interop.HwndSource
Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, name As String, parent As IntPtr)

參數

classStyle
Int32

視窗的 Win32 類別樣式。

style
Int32

視窗的 Win32 樣式。

exStyle
Int32

視窗的擴充 Win32 樣式。

x
Int32

視窗左邊緣的位置。

y
Int32

視窗上邊緣的位置。

name
String

視窗的名稱。

parent
IntPtr

nativeint

這個視窗之父視窗的控制代碼。

屬性

備註

重要

這個方法無法在網際網路安全性區域中使用。

適用於

HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、寬度、高度、名稱和父視窗,初始化 HwndSource 類別的新執行個體。

public:
 HwndSource(int classStyle, int style, int exStyle, int x, int y, int width, int height, System::String ^ name, IntPtr parent);
[System.Security.SecurityCritical]
public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent);
public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent);
[<System.Security.SecurityCritical>]
new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint -> System.Windows.Interop.HwndSource
new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint -> System.Windows.Interop.HwndSource
Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, width As Integer, height As Integer, name As String, parent As IntPtr)

參數

classStyle
Int32

視窗的 Win32 類別樣式。

style
Int32

視窗的 Win32 樣式。

exStyle
Int32

視窗的擴充 Win32 樣式。

x
Int32

視窗左邊緣的位置。

y
Int32

視窗上邊緣的位置。

width
Int32

視窗的寬度。

height
Int32

視窗的高度。

name
String

視窗的名稱。

parent
IntPtr

nativeint

這個視窗之父視窗的控制代碼。

屬性

備註

重要

這個方法無法在網際網路安全性區域中使用。

適用於

HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr, Boolean)

使用指定的類別樣式、樣式、延伸樣式、x-y 位置、寬度、高度、名稱和父視窗,以及指定視窗是否自動調整大小,初始化 HwndSource 類別的新執行個體。

public:
 HwndSource(int classStyle, int style, int exStyle, int x, int y, int width, int height, System::String ^ name, IntPtr parent, bool adjustSizingForNonClientArea);
[System.Security.SecurityCritical]
public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent, bool adjustSizingForNonClientArea);
public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent, bool adjustSizingForNonClientArea);
[<System.Security.SecurityCritical>]
new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint * bool -> System.Windows.Interop.HwndSource
new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint * bool -> System.Windows.Interop.HwndSource
Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, width As Integer, height As Integer, name As String, parent As IntPtr, adjustSizingForNonClientArea As Boolean)

參數

classStyle
Int32

視窗的 Win32 類別樣式。

style
Int32

視窗的 Win32 樣式。

exStyle
Int32

視窗的擴充 Win32 樣式。

x
Int32

視窗左邊緣的位置。

y
Int32

視窗上邊緣的位置。

width
Int32

視窗的寬度。

height
Int32

視窗的高度。

name
String

視窗的名稱。

parent
IntPtr

nativeint

這個視窗之父視窗的控制代碼。

adjustSizingForNonClientArea
Boolean

true 表示配置管理員包含用於調整大小的非工作區 (Client Area),否則為 false

屬性

備註

重要

這個方法無法在網際網路安全性區域中使用。

適用於