Ho registrato un hotkey e tutto va benissimo. Ma se il mio programma dovesse usare + di una hotkey? Come faccio? A seconda della hotkey premuta mi scrive un messaggio, come si fa?
codice:
ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyC)
¡¥ ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyV) ¡¥seconda hotkey
ProcessMessage
Private Sub ProcessMessages()
Dim Message As Msg
'loop until bCancel is set to True
Do While Not bCancel
'wait for a message
WaitMessage
'check if it's a HOTKEY-message
If PeekMessage(Message, Me.hWnd, WM_HOTKEY, WM_HOTKEY, PM_REMOVE) Then
¡K. ¡¥ se CTRL + V MSGBOX ¡§HAI PERSO¡¨ / SE CTRL +C MSGBOX 2HAI VINTO¡¨ „³ COME SI FA?
End If
'let the operating system process other events
DoEvents
Loop
End Sub