I would like to change a hotkey (from getasynckeystate) via button. Just like puush:
How could I do this?
anyone? /msg2short
Last edited by Jorndel; 05-26-2013 at 08:03 AM.
I guess I could do like "detect key" and then write the key pressed.
Now I've encountered another problem. How would I be able to change the hotkey for getasynckeystate while the program running?
This is the code that I have for getasynckeystate:
I was trying to do something like getasynckeystate("Keys." & blablabla.text") but that wouldn't work. Got any ideas?Code:Dim firstkey As Boolean Dim secondkey As Boolean Dim thirdkey As Boolean firstlkey = GetAsyncKeyState(Keys.ControlKey) secondkey = GetAsyncKeyState(Keys.ShiftKey) thirdkey = GetAsyncKeyState(Keys.F12) If firstkey And secondkey And thirdkey = True Then captureAreaStart.Show() End If
Sooo.. You're trying to change the hotkey to a specific key when you click the button or..?
Erm... I'm a little shocked now
We declare a variable inside the class, instead of the method/function/sub.
-Meaning it can be accessed by everything within the form1 class.
Meaning: If you assign a value to it, you just use that variable. To be the 'getkeyasnycstate' Key
Well, made a short code then to show you:
Last edited by Jorndel; 05-26-2013 at 10:00 AM.
Or Formkeydown event
If e.keycode = Keys.sum
blah
End If