ok i got my hotkey working
Ok there i have one that is when u press C, i also want another for when you press R but i dont know how to have two at the same time, some help please. Cheers.VB.NET Code:
Private Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer Private Declare Function UnregisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer) As Integer Private Const WM_HOTKEY As Integer = &H312 Private Const MOD_ALT As Integer = &H1 Private Const MOD_CONTROL As Integer = &H2 Private Const MOD_SHIFT As Integer = &H4 Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing UnregisterHotKey(Me.Handle, 0) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RegisterHotKey(Me.Handle, 0, 0, Asc("C")) End Sub Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = WM_HOTKEY Then 'DO WHATEVER HERE MyBase.WndProc(m) End Sub
EDIT: I need to know the IF statement for it as well please.




)
Reply With Quote