如何检测热键键入事件 [英] how to detect hot key keyup event

查看:47
本文介绍了如何检测热键键入事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    ' let the base class process the message
    MyBase.WndProc(m)
    ' if this is a WM_HOTKEY message, notify the parent object
    Const WM_HOTKEY As Integer = &H312
    If (m.Msg = WM_HOTKEY) Then

       counter += 1
       lblCounter.Text = counter

    End If
End Sub

推荐答案

这是一个问题吗?只需在此方法中设置一个断点,您将看到按热键并相应地使用其他消息参数会发生什么.邮件结构记录在这里: http://msdn.microsoft.com/zh-cn/library/ms646279(v = vs.85).aspx [
Is it a problem at all or not? Simply put a break point in this method and you will see what happens if you press a hot key, use other message parameters accordingly. The message structure is documented here: http://msdn.microsoft.com/en-us/library/ms646279(v=vs.85).aspx[^].

Any questions?

—SA


这篇关于如何检测热键键入事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆