[TUT] Simple Tapper (easyer way) - VB
Hello, Im TheRealOne and this is my first Tuturial, as the title says, It will theach you how to make a simple Tapper that works by pressing a key or clicking a button... (usefull for CA, AVA, Soldier Front and other games...) Using Visual Basic 2008. (The tapper CAN be used even if another program as the "focus")
I know that there are other tuturials for making a tapper, but i created this one, it has less coding and it was made by ME (exept the buttons part)...Lets start:
You only need a Timer on the design.
Set the Timer Interval to 100 and set "enabled" to TRUE...
Ok, now lets see the coding:
1) you need to declare user32 Lib so that you can use "GetAsyncKeyState"
[php] Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer[/php]
2) You must put what appens when the timer ticks:
[php] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim HotKey, Key As Boolean
HotKey = GetAsyncKeyState(Keys.F6)
Key = GetAsyncKeyState(Keys.F5)
If HotKey = True Then
Shell("NET STOP DHCP")
ElseIf Key = True Then
Shell("NET START DHCP")
End If
End Sub[/php]
You can change "(Keys.F5) and (Keys.F6) To whatever key you want...
[OPTIONAL]3) If you want to add a button to do the same thing as F5/f6 just write this and add 2 buttons... The buttons credits go to GrImReApEdv2.0 because this part is already on his post...
Button 1:
[php] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("NET START DHCP")
End Sub[/php]
Button 2:
[php] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Shell("Net STOP DHCP")
End Sub[/php]
Heres the full code, not including the buttons part:
[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim HotKey, Key As Boolean
HotKey = GetAsyncKeyState(Keys.F6)
Key = GetAsyncKeyState(Keys.F5)
If HotKey = True Then
Shell("NET STOP DHCP")
ElseIf Key = True Then
Shell("NET START DHCP")
End If
End Sub
End Class[/php]
Credits:
Tuturial~me
Press keys to work~me
Buttons(optional)~GrImReApEdv2.0
Press Thanks if this was usefull =D