ElementHost.EnableModelessKeyboardInterop(Window) 方法

定義

Window讓 在從Windows Forms以無模式開啟時,能夠正確接收鍵盤訊息。

public:
 static void EnableModelessKeyboardInterop(System::Windows::Window ^ window);
public static void EnableModelessKeyboardInterop (System.Windows.Window window);
static member EnableModelessKeyboardInterop : System.Windows.Window -> unit
Public Shared Sub EnableModelessKeyboardInterop (window As Window)

參數

window
Window

Windows Presentation Foundation (WPF) 視窗,以無模式開啟。

備註

EnableModelessKeyboardInterop呼叫 方法,以在 WPF 視窗以無模式開啟時轉送所有鍵盤訊息。 方法 EnableModelessKeyboardInterop 會在以Windows Forms為基礎的應用程式中安裝訊息篩選器。 篩選會在無強制回應視窗作用中時轉送所有鍵盤訊息。

適用於

另請參閱