|
发表于 2020-2-17 21:45:02
|
显示全部楼层
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 |
|