HwndSource 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 HwndSource 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| HwndSource(HwndSourceParameters) |
透過包含初始設定的結構初始化該類別的新 HwndSource 實例。 |
| HwndSource(Int32, Int32, Int32, Int32, Int32, String, IntPtr) |
初始化一個新的類別實例 HwndSource ,包含指定的類別樣式、樣式、擴展樣式、x-y 位置、名稱及父視窗。 |
| HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr) |
初始化一個新的類別實例 HwndSource ,並設定指定的類別樣式、樣式、擴展樣式、x-y 位置、寬度、高度、名稱及父視窗。 |
| HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr, Boolean) |
初始化一個新的類別實例 HwndSource ,包含指定的類別樣式、樣式、擴展樣式、x-y 位置、寬度、高度、名稱及父視窗,並指定視窗是否自動調整。 |
備註
Important
此方法在網際網路安全區域內無法使用。
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
一個包含建立視窗所需參數的結構。
- 屬性
備註
Important
此方法在網際網路安全區域內無法使用。
在某些情況下,這個建構子簽章可能更方便,因為預設結構包含一些適當的初始預設值。
Important
如果你使用這個簽章,請不要使用預設 HwndSourceParameters 的建構函式來構造 HwndSourceParameters 該 parameters 值的結構。 你必須使用能指定初始視窗名稱的 HwndSourceParameters 建構子。 如果你使用預設 HwndSourceParameters 建構子並建立 , HwndSource 該建構子不會顯示, HwndSource 因為初始視窗名稱是表示的 HWND 的建構要求。
適用於
HwndSource(Int32, Int32, Int32, Int32, Int32, String, IntPtr)
初始化一個新的類別實例 HwndSource ,包含指定的類別樣式、樣式、擴展樣式、x-y 位置、名稱及父視窗。
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
Windows 32 類別的視窗樣式。
- style
- Int32
Windows 32 的視窗設計。
- exStyle
- Int32
Windows的擴展版 Win32 風格。
- x
- Int32
窗戶左邊的位置。
- y
- Int32
窗戶上緣的位置。
- name
- String
視窗的名稱
- parent
-
IntPtr
nativeint
視窗父視窗的把手。
- 屬性
備註
Important
此方法在網際網路安全區域內無法使用。
適用於
HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr)
初始化一個新的類別實例 HwndSource ,並設定指定的類別樣式、樣式、擴展樣式、x-y 位置、寬度、高度、名稱及父視窗。
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
Windows 32 類別的視窗樣式。
- style
- Int32
Windows 32 的視窗設計。
- exStyle
- Int32
Windows的擴展版 Win32 風格。
- x
- Int32
窗戶左邊的位置。
- y
- Int32
窗戶上緣的位置。
- width
- Int32
窗戶的寬度。
- height
- Int32
窗戶的高度。
- name
- String
視窗的名稱
- parent
-
IntPtr
nativeint
視窗父視窗的把手。
- 屬性
備註
Important
此方法在網際網路安全區域內無法使用。
適用於
HwndSource(Int32, Int32, Int32, Int32, Int32, Int32, Int32, String, IntPtr, Boolean)
初始化一個新的類別實例 HwndSource ,包含指定的類別樣式、樣式、擴展樣式、x-y 位置、寬度、高度、名稱及父視窗,並指定視窗是否自動調整。
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
Windows 32 類別的視窗樣式。
- style
- Int32
Windows 32 的視窗設計。
- exStyle
- Int32
Windows的擴展版 Win32 風格。
- x
- Int32
窗戶左邊的位置。
- y
- Int32
窗戶上緣的位置。
- width
- Int32
窗戶的寬度。
- height
- Int32
窗戶的高度。
- name
- String
視窗的名稱
- parent
-
IntPtr
nativeint
視窗父視窗的把手。
- adjustSizingForNonClientArea
- Boolean
true讓版面管理員包含非客戶區的尺寸調整;否則,。 false
- 屬性
備註
Important
此方法在網際網路安全區域內無法使用。