关于如何定义快截键~!
帮我给个思路,就是我开个游戏,我想在游戏里面简化按键,比如说,原来我要用alt+f6来实现一个功能,现在我想用我自己定义一个快接键来实现这个功能,比如自己定义个R键来实现前面的ALT+F6才能实现的功能。谢谢大家了~!帮我一下~!
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long
Private Const WM_SETHOTKEY = &H32
Private Const HOTKEYF_ALT = &H4
Private Sub Form_Load()
Dim wHotkey As Integer
wHotkey = (HOTKEYF_ALT) * &H100 + Asc("B")
SendMessage Me.hwnd, WM_SETHOTKEY, ByVal wHotkey, 0
Me.WindowState = vbMinimized
End Sub