Anti-recoil in VB6

This article has been written before more than 24months, information might old.

Un anti-rcoil simplu in vb6 :

VERSION 5.00
Begin VB.Form Form1
   Caption         =   "Anti-recoil"
   ClientHeight    =   1440
   ClientLeft      =   5580
   ClientTop       =   5340
   ClientWidth     =   5040
   LinkTopic       =   "Form1"
   ScaleHeight     =   1440
   ScaleWidth      =   5040
   Begin VB.Timer Timer1
      Enabled         =   0   'False
      Interval        =   70
      Left            =   0
      Top             =   -120
   End
   Begin VB.Frame Frame1
      Caption         =   "Anti-Recoil"
      Height          =   1335
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   4815
      Begin VB.Timer Timer2
         Interval        =   1
         Left            =   1800
         Top             =   240
      End
      Begin VB.Line Line6
         X1              =   4680
         X2              =   4680
         Y1              =   240
         Y2              =   1200
      End
      Begin VB.Line Line5
         X1              =   4560
         X2              =   4560
         Y1              =   240
         Y2              =   1200
      End
      Begin VB.Line Line4
         X1              =   3000
         X2              =   4680
         Y1              =   1200
         Y2              =   1200
      End
      Begin VB.Line Line3
         X1              =   3000
         X2              =   4680
         Y1              =   240
         Y2              =   240
      End
      Begin VB.Line Line2
         X1              =   3000
         X2              =   3000
         Y1              =   1200
         Y2              =   240
      End
      Begin VB.Line Line1
         X1              =   3120
         X2              =   3120
         Y1              =   1200
         Y2              =   240
      End
      Begin VB.Label Label2
         BackStyle       =   0  'Transparent
         Caption         =   "This Program Is Vac Proof and it will Reduce your recoil. No Recoil Will Stop Recoil Hotkeys [Pagedown -Will Lessen The Recoil Strength. [Pageup -Will Strengthen The Recoil Strength.[End-Will Stop Anti-Recoil.[Home-Will Start The Anti-Recoil  For All FPS Games":0000
         BeginProperty Font
            Name            =   "MS Serif"
            Size            =   6.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   120
         TabIndex        =   2
         Top             =   240
         Width           =   2895
         WordWrap        =   -1  'True
      End
      Begin VB.Label Label1
         Caption         =   " Recoil Speed:100"
         Height          =   495
         Left            =   3120
         TabIndex        =   1
         Top             =   600
         Width           =   1335
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

 Private Const VK_LBUTTON = &H1
 Private Const VK_PGDN = &H22
 Private Const VK_PGUP = &H21
 Private Const VK_END = &H23
 Private Const VK_HOME = &H24

Private Type POINTAPI
X As Long
Y As Long
End Type
Dim Coil As POINTAPI
Dim EX As Long
Dim WHY As Long

Sub CoilMinus()
Dim Speed
Speed = Timer1.Interval
Speed = Speed - 1
Timer1.Interval = Speed
If Speed < 1 Then
Speed = 1
End If
Label1.Caption = " Recoil Speed:" & Speed

End Sub
Sub CoilPlus()
Dim Speed
Speed = Timer1.Interval
Speed = Speed + 1
Timer1.Interval = Speed
If Speed > 100 Then
Speed = 100
End If
Label1.Caption = " Recoil Speed:" & Speed
End Sub

Private Sub Mouse()
AntiRecoil = GetCursorPos(Coil)
EX = Coil.X
WHY = Coil.Y
Call SetCursorPos(EX, WHY + 1)
End Sub

Private Sub Form_Load()
Label1.Caption = " Recoil Speed:0"
End Sub

Private Sub Image1_Click()

End Sub

Private Sub Timer1_Timer()
If GetAsyncKeyState(VK_LBUTTON) < 0 Then
Mouse
End If
If GetAsyncKeyState(VK_PGDN) = -32767 Then
CoilMinus
End If
If GetAsyncKeyState(VK_PGUP) = -32767 Then
CoilPlus
End If
End Sub

Private Sub Timer2_Timer()
If GetAsyncKeyState(VK_END) = -32767 Then
Timer1.Enabled = False
Label1.Caption = " Recoil Speed:0"
End If
If GetAsyncKeyState(VK_HOME) = -32767 Then
Timer1.Enabled = True
Label1.Caption = " Recoil Speed:" & Timer1.Interval
End If

End Sub
Share the joy

Leave a Reply