HwndSourceParameters 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 HwndSourceParameters 类的新实例。 请勿使用无参数构造函数; HwndSourceParameters请参阅“备注”。
重载
| 名称 | 说明 |
|---|---|
| HwndSourceParameters(String) |
使用指定的窗口名称初始化类的新实例 HwndSourceParameters 。 |
| HwndSourceParameters(String, Int32, Int32) |
使用指定的窗口名称和初始大小初始化类的新实例 HwndSourceParameters 。 |
注解
重要
不要使用默认的(无参数)构造函数构造此结构的实例。 HwndSourceParameters由无参数构造函数创建的实例会导致HwndSourceParameters无法分配WindowName该实例(即使WindowName该属性似乎可设置)。 如果此类实例作为构造函数的参数 HwndSource 应用,则生成的 HwndSource 实例无法显示窗口。
HwndSourceParameters(String)
使用指定的窗口名称初始化类的新实例 HwndSourceParameters 。
public:
HwndSourceParameters(System::String ^ name);
public HwndSourceParameters(string name);
new System.Windows.Interop.HwndSourceParameters : string -> System.Windows.Interop.HwndSourceParameters
Public Sub New (name As String)
参数
- name
- String
窗口的名称。
另请参阅
适用于
HwndSourceParameters(String, Int32, Int32)
使用指定的窗口名称和初始大小初始化类的新实例 HwndSourceParameters 。
public:
HwndSourceParameters(System::String ^ name, int width, int height);
public HwndSourceParameters(string name, int width, int height);
new System.Windows.Interop.HwndSourceParameters : string * int * int -> System.Windows.Interop.HwndSourceParameters
Public Sub New (name As String, width As Integer, height As Integer)
参数
- name
- String
窗口的名称。
- width
- Int32
窗口的宽度(以像素为单位)。
- height
- Int32
窗口的高度(以像素为单位)。
注解
不要为 width 或 height 参数传递 0(零)。 尽管该方法最终成功,但即使传递了 0,也会出现显著的性能损失。