Can someone give me hotkeys b/c every time i google and use they = Fail help is app.
You can do this:
After Public Class:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
In a timer (Enabled, Interval="300"):
Code:
If GetAsyncKeyState(Keys.YOURHOTKEY) = True Then
' Do whatver u want!
End if
Hope it help you.
Posts 1–11 of 11 · Page 1 of 1
Post a Reply
Tags for this Thread
None
Thank'd and rep'd now lets see if it works.
Originally Posted by Lyoto Machida
You can do this:
After Public Class:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
In a timer (Enabled, Interval="300"):
Code:
If GetAsyncKeyState(Keys.YOURHOTKEY) = True Then
' Do whatver u want!
End if
Hope it help you.
Atleast give him the proper declaration -.-"
[highlight="vb"]
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16[/highlight]
@if - no need to doublecheck for a boolean..
Originally Posted by Blubb1337
Atleast give him the proper declaration -.-"
[highlight="vb"]
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16[/highlight]
@if - no need to doublecheck for a boolean..
I know about the If but i use that just to read better the code..
And my declaration works fine xD
Originally Posted by Lyoto Machida
I know about the If but i use that just to read better the code..
And my declaration works fine xD
Kevin was referring to this
[highlight=vbnet]
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
[/highlight]
[highlight=vbnet]
<DllImport("user32.dll", CharSet:=CharSet.Auto, setLastError:=True)> _
Public Function GetAsyncKeyState(ByVal vKey As Integer) As Short
End Function
[/highlight]
Originally Posted by NextGen1
Kevin was referring to this
[highlight=vbnet]
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
[/highlight]
[highlight=vbnet]
<DllImport("user32.dll", CharSet:=CharSet.Auto, setLastError:=True)> _
Public Function GetAsyncKeyState(ByVal vKey As Integer) As Short
End Function
[/highlight]
I know about the If but i use that just to read better the code..
And my declaration works fine xD
I have already explained this 20 times. Your declaration may cause issues on x64. Program may stop working there due to compability issues, so you should rather use my declaration.