Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27192

hotkey

$
0
0
im planning to make dota hotkey
which i mean
when user press alt+Z it will send numpad 1 on the game
i used tiker on it and add timer1.start on formload
if still dont get what i mean
heres the code
Code:

Dim first as boolean
jeff =GetAsyncKey(keys.Alt + Keys.Z
If first = True Then
Dim StartByte As Sbyte = Ctype(Keys.Numpad,Sbyte)
For I As Byte =0 To 9

Next
keybd_event(StartByte, 0, 0)
keybd_event(StartByte, 0, 2)

StartByte += CsByte(1)
end if

i already add
Declare Sub keybd_event Lib "user32.dll" (ByVal Vk As SByte, ByVal Scan As Byte, _
ByVal Flags As UInteger, Optional Byval ExtraInfo As Integer = 0)
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

when i try to debug it i got an
error which is
PInvokeStackImbalance was detected

if anyone knows how to solve it
please helped me thank you

Viewing all articles
Browse latest Browse all 27192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>