Public Class Form1
#Region "Declarations"
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Short
Private hack1State As Boolean = False
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (GetAsyncKeyState(Keys.NumPad0) And 1) > 0 Then
''user pressed the key for 'toggle hack1'
hack1State = Not hack1State '' toggle the value
If hack1State Then
'' TODO: call Hack1Enable() here
Me.Text = "Hack enabled"
Else
''TODO: call Hack1Disable() here
Me.Text = "Hack disabled"
End If
End If
End Sub
End Class
Private Sub hotkey_Tick(sender As Object, e As EventArgs) Handles hotkey.Tick
If (GetAsyncKeyState(Keys.NumPad0) And 1) > 0 Then
''user pressed the key for 'toggle hack1'
hack1State = Not hack1State '' toggle the value
If hack1State Then
'' TODO: call Hack1Enable() here
lblChange.Text = "Hack enabled"
Else
''TODO: call Hack1Disable() here
lblChange.Text = "Hack disabled"
End If
End If
End Sub
Private Sub hotkey_Tick(sender As Object, e As EventArgs) Handles hotkey.Tick
Dim hotkey1 As Boolean
If (GetAsyncKeyState(Keys.NumPad0) And 1) > 0 Then
''user pressed the key for 'toggle hack1'
hotkey1 = Not hotkey1 '' toggle the value
If hotkey1 Then
'' TODO: call Hack1Enable() here
lblChange.Text = "Hack enabled"
Else
''TODO: call Hack1Disable() here
lblChange.Text = "Hack disabled"
End If
End If
End Sub
Public Class Form1
#Region "Declarations"
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Short
Private hack1State As Boolean = False
Private lastTimeToggled As DateTime = Date.Now
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (GetAsyncKeyState(Keys.NumPad0) And 1) > 0 Then
''user pressed the key for 'toggle hack1'
If (Date.Now.Subtract(lastTimeToggled).TotalMilliseconds > 500) Then
hack1State = Not hack1State '' toggle the value
If hack1State Then
'' TODO: call Hack1Enable() here
Me.Text = "Hack enabled"
Else
''TODO: call Hack1Disable() here
Me.Text = "Hack disabled"
End If
lastTimeToggled = Date.Now
End If
End If
End Sub
End Class
Public Class Form1
#Region "Declarations"
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Short
Private hack1State As Boolean = False
Private flipswitch As Boolean = False
Private hackswitch As Boolean = False
Dim hawtkey As Boolean = GetAsyncKeyState(Keys.Oemtilde)
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (hawtkey And 1) > 0 Then
''user pressed the key for 'toggle hack1'
If hawtkey = True Then
If flipswitch = False Then flipswitch = True
End If
If hawtkey = False And flipswitch = True Then
flipswitch = False
If Hackswitch = true then
hackswitch = false
'Disable hackHere
else
hackswitch = true
'Enable hack Here
End If
End If
End Sub
End Class
Public Class Form1
#Region "Declarations"
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Short
Private hack1State As Boolean = False
Private toggleHack1 As Boolean = False
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.NumPad1) <> 0 Then
toggleHack1 = True
ElseIf toggleHack1 = True Then
toggleHack1 = False
If hack1State = False Then
''EnableHack1() here
Me.Text = "Hack Enabled"
hack1State = true
Else
''DisableHack1() here
Me.Text = "Hack Disabled"
hack1State = false
End If
End If
End Sub
End Class