IWpfKeyboardTrackingService.BeginTrackingKeyboard 方法

开始跟踪键盘。

命名空间:  Microsoft.VisualStudio.Language.Intellisense
程序集:  Microsoft.VisualStudio.Language.Intellisense(在 Microsoft.VisualStudio.Language.Intellisense.dll 中)

语法

声明
Sub BeginTrackingKeyboard ( _
    handle As IntPtr, _
    messagesToCapture As IList(Of UInteger) _
)
void BeginTrackingKeyboard(
    IntPtr handle,
    IList<uint> messagesToCapture
)
void BeginTrackingKeyboard(
    IntPtr handle, 
    IList<unsigned int>^ messagesToCapture
)
abstract BeginTrackingKeyboard : 
        handle:IntPtr * 
        messagesToCapture:IList<uint32> -> unit
function BeginTrackingKeyboard(
    handle : IntPtr, 
    messagesToCapture : IList<uint>
)

参数

  • handle
    类型:IntPtr

    应将消息重定向到的有效 Win32 窗口句柄 (HWND)。

  • messagesToCapture
    类型:IList<UInt32>

    要重定向到指定窗口句柄的 Win32 消息的列表。

备注

在调用方法之后,所有键盘事件都将先路由到 WPF,在应用程序的宿主之前 (例如, Visual Studio) 会看到它们。

.NET Framework 安全性

请参阅

参考

IWpfKeyboardTrackingService 接口

Microsoft.VisualStudio.Language.Intellisense 命名空间