WindowsFormsHost.EnableWindowsFormsInterop 方法

定义

允许在 Form 从 WPF 以无模式打开时使其正常运行。

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 实例,只需调用此方法一次。

适用于

另请参阅