Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim starthotkey As Boolean
starthotkey = GetAsyncKeyState(Keys.F7)
Dim stophotkey As Boolean
stophotkey = GetAsyncKeyState(Keys.F8)
If starthotkey = True Then
If TextBox1.Text = "" Then
Timer3.Stop()
MsgBox("To Prevent Host Failure, Start the game first.")
Timer4.Start()
Else
Shell("cmd.exe /c ipconfig/release")
Button1.Text = "Connect (F8)"
End If
Else
Timer4.Stop()
End If
If stophotkey = True Then
Timer3.Stop()
Shell("cmd.exe /c ipconfig/renew")
Button1.Text = "Disconnect (F7)"
Timer4.Start()
Else
Timer4.Stop()
End If
End Sub
Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
Timer4.Stop()
Timer3.Start()
End Sub
starthotkey = GetAsyncKeyState(Keys.F7) And &H8000
Public Class Form1
Public 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 WR As Process() = Process.GetProcessesByName("warrock")
Dim GZ As Process() = Process.GetProcessesByName("gunz")
Dim CA As Process() = Process.GetProcessesByName("engine")
Dim CF As Process() = Process.GetProcessesByName("crossfire")
Dim PB As Process() = Process.GetProcessesByName("pblackout")
Dim M1 As Process() = Process.GetProcessesByName("iw3mp")
Dim M2 As Process() = Process.GetProcessesByName("iw4mp")
Dim BO As Process() = Process.GetProcessesByName("blackopsmp")
If WR.Length = 1 Then
TextBox1.Text = "WR"
Timer2.Start()
Timer1.Stop()
Me.Label1.ForeColor = Color.LimeGreen
ElseIf GZ.Length = 1 Then
TextBox1.Text = "GZ"
Timer2.Start()
Timer1.Stop()
ElseIf CA.Length = 1 Then
TextBox1.Text = "CA"
Timer2.Start()
Timer1.Stop()
ElseIf CF.Length = 1 Then
TextBox1.Text = "CF"
Timer2.Start()
Timer1.Stop()
ElseIf PB.Length = 1 Then
TextBox1.Text = "PB"
Timer2.Start()
Timer1.Stop()
ElseIf M1.Length = 1 Then
TextBox1.Text = "M1"
Timer2.Start()
Timer1.Stop()
ElseIf M2.Length = 1 Then
TextBox1.Text = "M2"
Timer2.Start()
Timer1.Stop()
ElseIf BO.Length = 1 Then
TextBox1.Text = "BO"
Timer2.Start()
Timer1.Stop()
Else
TextBox1.Text = ""
Timer2.Start()
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Timer2.Stop()
If TextBox2.Text = "date" Then
If TextBox1.Text = "WR" Then
Me.Label1.Text = "Currently: In-Game: WarRock"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "GZ" Then
Me.Label1.Text = "Currently: In-Game: Gunz"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "CA" Then
Me.Label1.Text = "Currently: In-Game: Combat Arms"
Me.Label1.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "CF" Then
Me.Label1.Text = "Currently: In-Game: CrossFire"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "PB" Then
Me.Label1.Text = "Currently: In-Game: Project Blackout"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "M1" Then
Me.Label1.Text = "Currently: In-Game: Modern Warfare"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "M2" Then
Me.Label1.Text = "Currently: In-Game: Modern Warfare 2"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "BO" Then
Me.Label1.Text = "Currently: In-Game: Black Ops"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
ElseIf TextBox1.Text = "" Then
Me.Label1.Text = "Currently: Not in-game"
Me.Label1.ForeColor = Color.Red
Me.ForeColor = Color.Red
Me.Button1.ForeColor = Color.Red
Me.Button1.FlatAppearance.BorderColor = Color.Red
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Maroon
Me.Button1.FlatAppearance.MouseOverBackColor = Color****syBrown
Timer1.Start()
End If
Else
If TextBox1.Text = "WR" Then
Me.Label1.Text = "Currently: In-Game: WarRock" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "GZ" Then
Me.Label1.Text = "Currently: In-Game: Gunz" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "CA" Then
Me.Label1.Text = "Currently: In-Game: Combat Arms" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "CF" Then
Me.Label1.Text = "Currently: In-Game: CrossFire" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "PB" Then
Me.Label1.Text = "Currently: In-Game: Project Blackout" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "M1" Then
Me.Label1.Text = "Currently: In-Game: Modern Warfare" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "M2" Then
Me.Label1.Text = "Currently: In-Game: Modern Warfare 2" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "BO" Then
Me.Label1.Text = "Currently: In-Game: Black Ops" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.LimeGreen
Me.ForeColor = Color.LimeGreen
Me.Button1.ForeColor = Color.LimeGreen
Me.Button1.FlatAppearance.BorderColor = Color.LimeGreen
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Green
Me.Button1.FlatAppearance.MouseOverBackColor = Color.MediumSeaGreen
Timer1.Start()
TextBox2.Text = ""
ElseIf TextBox1.Text = "" Then
Me.Label1.Text = "Currently: Not in-game" & " (" & TimeString & ")"
Me.Label1.ForeColor = Color.Red
Me.ForeColor = Color.Red
Me.Button1.ForeColor = Color.Red
Me.Button1.FlatAppearance.BorderColor = Color.Red
Me.Button1.FlatAppearance.MouseDownBackColor = Color.Maroon
Me.Button1.FlatAppearance.MouseOverBackColor = Color****syBrown
Timer1.Start()
TextBox2.Text = "Date"
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Connect (F8)" Then
Shell("cmd.exe /c ipconfig/renew")
Button1.Text = "Disconnect (F7)"
Else
If TextBox1.Text = "" Then
MsgBox("To Prevent Host Failure, Start the game first.")
Else
Shell("cmd.exe /c ipconfig/release")
Button1.Text = "Connect (F8)"
End If
End If
End Sub
Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
Me.Text = "Leaf's Tapper " & DateString & " / " & TimeString
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim starthotkey As Boolean
starthotkey = GetAsyncKeyState(Keys.F7) And &H8000
Dim stophotkey As Boolean
stophotkey = GetAsyncKeyState(Keys.F8)
If starthotkey = True Then
If TextBox1.Text = "" Then
Timer3.Stop()
MsgBox("To Prevent Host Failure, Start the game first.")
Timer4.Start()
Else
Shell("cmd.exe /c ipconfig/release")
Button1.Text = "Connect (F8)"
End If
Else
Timer4.Stop()
End If
If stophotkey = True Then
Timer3.Stop()
Shell("cmd.exe /c ipconfig/renew")
Button1.Text = "Disconnect (F7)"
Timer4.Start()
Else
Timer4.Stop()
End If
End Sub
Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
Timer4.Stop()
Timer3.Start()
End Sub
End Class

![=]](/forum/images/emotions/=].gif)