WindowsFormsHost.EnableWindowsFormsInterop 方法

定義

從 WPF 以非強制回應的方式開啟 Form 時,讓它可以正確運作。

public:
 static void EnableWindowsFormsInterop();
public static void EnableWindowsFormsInterop ();
static member EnableWindowsFormsInterop : unit -> unit
Public Shared Sub EnableWindowsFormsInterop ()

備註

呼叫 方法, EnableWindowsFormsInterop 以在以無模式開啟 時 System.Windows.Forms.Form 轉送所有鍵盤訊息。 方法 EnableWindowsFormsInterop 會安裝無模式表單在 WPF 開啟時正常運作所需的訊息篩選。 您只需要針對特定 WindowsFormsHost 實例呼叫這個方法一次。

適用於

另請參閱