+ -
当前位置:首页 → 问答吧 → 为什么不能注册windows键(mod_win)为热键?

为什么不能注册windows键(mod_win)为热键?

时间:2011-09-07

来源:互联网

代码如下
Ret = SetWindowLong(Me.hwnd, GWL_WNDPROC, AddressOf WndProc)
idHotKey = GlobalAddAtom("Hotkey")
Modifiers = MOD_WIN 
uVirtKey1 = vbKeyS
'注册热键
Ret = RegisterHotKey(Me.hwnd, idHotKey, Modifiers, uVirtKey1)
If Ret = 0 Then MsgBox "注册热键失败,请使用其它热键!", vbCritical, "Error"

注册alt ctrl 和 shift都可以,就是注册windows键的时候提示错误。

作者: w12wangbo   发布时间: 2011-09-07

参考AutoHotKey源代码http://www.autohotkey.com

作者: zhao4zhong1   发布时间: 2011-09-08

热门下载

更多