HwndSourceParameters 建構函式

定義

初始化 HwndSourceParameters 類別的新執行個體。 請勿對 HwndSourceParameters 使用無參數建構函式;請參閱<備註>。

多載

HwndSourceParameters(String)

使用指定的視窗名稱,初始化 HwndSourceParameters 類別 (Class) 的新執行個體。

HwndSourceParameters(String, Int32, Int32)

使用指定的視窗名稱和初始大小,初始化 HwndSourceParameters 類別的新執行個體。

備註

重要

請勿使用預設 (無參數) 建構函式來建構這個 結構的實例。 HwndSourceParameters無參數建構函式所建立的實例會導致 HwndSourceParameters 無法指派 WindowName (,即使 WindowName 屬性似乎可設定) 也一樣。 如果這類實例套用為建構函式的參數 HwndSource ,則產生的 HwndSource 無法顯示視窗。

HwndSourceParameters(String)

使用指定的視窗名稱,初始化 HwndSourceParameters 類別 (Class) 的新執行個體。

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

視窗的高度 (以像素為單位)。

備註

請勿針對 widthheight 參數傳遞 0 (零) 。 雖然方法最終會成功,即使您通過 0,仍會發生顯著的效能負面影響。

另請參閱

適用於