[Help]Working hotkeys?

Posts 1–11 of 11 · Page 1 of 1
[Help]Working hotkeys?
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.
Quote Originally Posted by Lyoto Machida View Post
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..
Quote Originally Posted by Blubb1337 View Post
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
Quote Originally Posted by Lyoto Machida View Post


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]
Quote Originally Posted by NextGen1 View Post


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]
lol I never see that code before xDD

PS: Not joking.
Quote Originally Posted by Lyoto Machida View Post


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.
Thank'd and rep'd now lets see if it works.
Uh Oh, That scares me
Quote Originally Posted by willrulz188 View Post
if you want them stronger here - Jason's
Always used to get a PInvoke error on that.
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us