Public Class Autoclicker
Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwExtraInfo As Long)
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F2 Then
Timer1.Start()
Else
If e.KeyCode = Keys.F3 Then
Timer1.Stop()
End If
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
KeyPreview = True
AutoSizeMode = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = TextBox1.Text + 1
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
mouse_event(&H2, 0, 0, 0, 1)
mouse_event(&H4, 0, 0, 0, 1)
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start("mailto:" & "[email protected]")
End Sub
End Class
Public Class Autoclicker
Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwExtraInfo As Long)
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F2 Then
Timer1.Start()
Else
If e.KeyCode = Keys.F3 Then
Timer1.Stop()
End If
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
KeyPreview = True
AutoSizeMode = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = TextBox1.Text + 1
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
mouse_event(&H2, 0, 0, 0, 1)
mouse_event(&H4, 0, 0, 0, 1)
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start("mailto:" & "[email protected]")
End Sub
End Class
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
mouse_event(&H2, 0, 0, 0, 1)
mouse_event(&H4, 0, 0, 0, 1)
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If e.KeyCode = Keys.F2 Then
Timer1.Start()
Else
If e.keycode = Keys.F3 Then
Timer1.Stop()
End If
End If
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If e.KeyCode = Keys.F2 Then
Timer1.Start()
Else
If e.keycode = Keys.F3 Then
Timer1.Stop()
End If
End If
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Declare Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Integer
End Function
Private Sub myTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myTimer.Tick
Dim hotkey As Boolean = GetAsyncKeyState(Keys.F2)
If hotkey = True Then
' do something
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Declare Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Integer
End Function
Private Sub myTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myTimer.Tick
Dim hotkey As Boolean = GetAsyncKeyState(Keys.F2)
If hotkey = True Then
' do something
End If
End Sub
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Declare Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Integer
End Function
Private Sub myTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim hotkey As Boolean = GetAsyncKeyState(Keys.F2)
If hotkey = True Then
' do something
End If
End Sub
End Class
Error 1 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a Declare.
Error 2 'Lib' expected.
Error 3 'End Function' must be preceded by a matching 'Function'.
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Declare Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Integer
End Function
Private Sub myTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim hotkey As Boolean = GetAsyncKeyState(Keys.F2)
If hotkey = True Then
' do something
End If
End Sub
End Class
Error 1 'System.Runtime.InteropServices.DllImportAttribute' cannot be applied to a Declare.
Error 2 'Lib' expected.
Error 3 'End Function' must be preceded by a matching 'Function'.
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Copyright © 2024, NextGenUpdate.
All Rights Reserved.