Code:
Public Class Form1
Public Declare Function GetAsyncKeyState Lib "user64" (ByVal vKey As Long) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Integer) As Integer
Declare Function GetKeyState Lib "user32.dll" (ByVal KeyCode As Long) As Integer
Private Declare Sub mouse_event Lib "user32" (ByVal dwflag As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextrainfo As Long)
Private Const mouseclickup = 4
Private Const mouseclicdownl = 2
Const VK_LBUTTON = &H1
Const VK_RBUTTON = &H2
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form2.Show()
Dim intXr As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intYr As Integer = Screen.PrimaryScreen.Bounds.Height
Timer1.Start()
Me.Label1.Text = "Your Resolution is: " & intXr & " x " & intYr
Me.Label1.ForeColor = Color.LimeGreen
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width / 2
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height / 2
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
''gone
Timer2.Start()
Me.Label2.Text = "Currently: In-Game: WarRock"
Me.Label2.ForeColor = Color.LimeGreen
Me.Opacity = 1
Me.TextBox3.Text = "In"
Form3.TopMost = True
ElseIf GZ.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Gunz"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf CA.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Combat Arms"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf CF.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Crossfire"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf PB.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Project Blackout"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf M1.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Modern Warfare"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf M2.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Modern Warfare 2"
Me.Label2.ForeColor = Color.LimeGreen
ElseIf BO.Length = 1 Then
''gone
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Cursor.Position = New Point(intX, intY)
Me.Label2.Text = "Currently: In-Game: Black Ops"
Me.Label2.ForeColor = Color.LimeGreen
Else
Me.Label2.Text = "Currently: Not in-game"
Me.Label2.ForeColor = Color.Red
Timer2.Stop()
Me.Opacity = 100
Me.TextBox3.Text = "Out"
Me.TopMost = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "En" Then
Button1.Text = "Disable Xhair"
Form3.Show()
Me.Button1.ForeColor = Color.LimeGreen
TextBox1.Text = "Di"
ElseIf TextBox1.Text = "Di" Then
Button1.Text = "Enable Xhair"
Form3.Close()
Me.Button1.ForeColor = Color.Red
TextBox1.Text = "En"
End If
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim lb As Boolean
lb = GetAsyncKeyState(Keys.LButton)
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width / 2
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height / 2
'' If lb = True Then
''If TextBox2.Text = "Clicked" Then
''Cursor.Position = New Point(intX, intY)
'' '' TextBox2.Text = "NClicked"
'' Timer1.Interval = 200
'' Else
'' Cursor.Position = New Point(intX, intY)
'' mouse_event(mouseclicdownl, 0, 0, 0, 0)
'' mouse_event(mouseclickup, 0, 0, 0, 0)
'' TextBox2.Text = "Clicked"
'' Timer1.Interval = 1
'' End If
''End If
End Sub
End Class
Form2:
Code:
Public Class Form3
Public Declare Function GetAsyncKeyState Lib "user64" (ByVal vKey As Long) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Integer) As Integer
Declare Function GetKeyState Lib "user32.dll" (ByVal KeyCode As Long) As Integer
Private Declare Sub mouse_event Lib "user32" (ByVal dwflag As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwextrainfo As Long)
Private Const mouseclickup = 4
Private Const mouseclicdownl = 2
Const VK_LBUTTON = &H1
Const VK_RBUTTON = &H2
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.CenterToScreen()
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width / 2
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height / 2
Dim half As Integer = 20
Me.Location = New Point(Me.Location.X, Me.Location.Y + half)
Me.BackColor = Nothing
TransparencyKey = BackColor
If GetAsyncKeyState(VK_RBUTTON) Then
If GetAsyncKeyState(VK_LBUTTON) Then
Me.BackgroundImage = My.Resources.Zoom_in_and_shoot
Else
Me.BackgroundImage = My.Resources.Zoom_in
End If
ElseIf GetAsyncKeyState(VK_LBUTTON) Then
Me.BackgroundImage = My.Resources.kkr_vet_new_chill_uitgerekt
If Form1.TextBox3.Text = "In" Then
If Form1.TextBox2.Text = "Clicked" Then
Cursor.Position = New Point(intX, intY)
Form1.TextBox2.Text = "NClicked"
Timer1.Interval = 200
Else
Me.BackgroundImage = My.Resources.kkr_vet_teston_opacioty
Cursor.Position = New Point(intX, intY)
mouse_event(mouseclicdownl, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Form1.TextBox2.Text = "Clicked"
Timer1.Interval = 1
End If
Else
End If
End If
End Sub
End Class
I actually HAD 3 forms