HwndSource 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 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 ,并指定窗口是否自动化。 |
注解
Important
此方法在 Internet 安全区域中不可用。
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
此方法在 Internet 安全区域中不可用。
在某些情况下,此构造函数签名可能更方便,因为默认结构包含一些适当的初始默认值。
Important
如果使用此签名,请不要使用默认HwndSourceParameters构造函数来构造HwndSourceParametersparameters值的结构。 必须使用 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
窗口的父窗口的句柄。
- 属性
注解
Important
此方法在 Internet 安全区域中不可用。
适用于
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
窗口的父窗口的句柄。
- 属性
注解
Important
此方法在 Internet 安全区域中不可用。
适用于
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 如果布局管理器包含用于调整大小的非工作区,则为否则,为 false.
- 属性
注解
Important
此方法在 Internet 安全区域中不可用。