VB Project Source Code

Auto Clicker tutorial vb.net




Free download this tutorial link below


Imports System

Public Class Form1
    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 Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        MyMethod()
    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 MyMethod()
        Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
        Dim Var1 As Integer = 0
        Dim Var2 As Integer = 0
        Dim Var3 As Integer = 0
        Var1 = TextBox1.Location.X
        Var2 = Windows.Forms.Cursor.Position.X
        Var3 = Windows.Forms.Cursor.Position.X - Me.Location.X - 50
        Windows.Forms.Cursor.Position = New Point(Me.Location.X + TextBox1.Location.X + TextBox1.Width / 2, Me.Location.Y + TextBox1.Location.Y + TextBox1.Height + TextBox1.Height / 1)
        If TextBox1.Location.X = Var3 Then
            mouse_event(&H2, 0, 0, 0, 1)
            mouse_event(&H4, 0, 0, 0, 1)

        End If
        Timer1.Stop()
    End Sub