@wilson945766:
Try this one:
Code:Dim HotKey As Boolean HotKey = GetAsyncKeyState(Keys.P) If My.Computer.Keyboard.CtrlKeyDown And HotKey Then tmrUsername.Start() End If
I got this which is working fine But i want a multi global hotkey for example Ctrl p,Ctrl X, Ctrl Alt Del
I triedCode:Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16 Dim hotkey As Boolean hotkey = GetAsyncKeyState(Keys.Home) If hotkey = True Then timer1.Start() End If
I also triedCode:Dim hotkey1 As Boolean Dim hotkey2 As Boolean hotkey1 = GetAsyncKeyState(Keys.Control) hotkey2 = GetAsyncKeyState(Keys.Home) If hotkey1 = True And hotkey2 = True Then tmrUsername.Start() End If
but none of theseCode:Dim hotkey As Boolean hotkey = GetAsyncKeyState(Keys.Control And Keys.Home) If hotkey = True Then tmrUsername.Start() End If
I just want a hotkey like (Ctrl + P) both holded down not just one
Last edited by wilson945766; 02-05-2012 at 03:58 PM.
@wilson945766:
Try this one:
Code:Dim HotKey As Boolean HotKey = GetAsyncKeyState(Keys.P) If My.Computer.Keyboard.CtrlKeyDown And HotKey Then tmrUsername.Start() End If
wilson945766 (02-05-2012)
gimme a second let me try it
---------- Post added at 06:24 PM ---------- Previous post was at 06:15 PM ----------
@Hassan thankz it works now i know how to add even more hotkey
eg:
Code:Dim HotKey As Boolean HotKey = GetAsyncKeyState(Keys.T) If My.Computer.Keyboard.CtrlKeyDown And My.Computer.Keyboard.AltKeyDown And HotKey Then tmrUsername.Start() End If
Yeah cool. Marked Solved !