如何使用user32.dll区分已注册的热键

问题描述

我已经注册了两个热键

RegisterHotKey(thiswindow,(uint) WindowKeys.Alt,1,(int)Keys.D1); 
RegisterHotKey(thiswindow,2,(int)Keys.D2);

现在如何使用以下方法区分它们:

protected override void WndProc(ref Message keypressed)
        {
            if (keypressed.Msg == 0x0312)
            {
                if (alt+d1 is pressed)
                   //do something
                if (alt+d2 is pressed)
                   //do something
            }

            base.WndProc(ref keypressed);
        }

我正在导入user32.dll的WinForm项目中执行此操作。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)