要调用 CTRL+S键应该怎么写?
要调用 CTRL+S键应该怎么写?
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
Const HOTKEYF_SHIFT = &H1
Const HOTKEYF_CONTROL = &H2
Const HOTKEYF_ALT = &H4
Private Sub Form_Load()
Dim wHotkey As Integer
wHotkey = (HOTKEYF_CONTROL) * &H100 + Asc("S")
SendMessage Me.hwnd, WM_SETHOTKEY, ByVal wHotkey, 0
Me.WindowState = vbMinimized
End Sub