如何判断创建的“系统热键”是否冲突?
如何判断创建的“系统热键”是否冲突?
[解决办法]
Dim ret As Long
ret = RegisterHotKey(hwnd, hotKeyID, key, key1)
If ret = 0 Then
MessageBox hwnd, hotKeyType & "已经占用!!请重新设置!! ", "提示 ", vbInformation + vbOKOnly
ElseIf ret = 1 Then
'设置成功
SetHotKey = True
Else
MessageBox hwnd, "设置 " & hotKeyType & "失败!!请重新设置!! ", "提示 ", vbInformation + vbOKOnly
End If