µCh
25th January 2008, 23:49
Hello,
I want to make an AC in VB 2008, but I have to idea how to start, I checked the OK libary but it got mostly tut's for VB6 and the codes are different from VB 2008.
So, my question: How do I start? =D
XxOsirisxX
26th January 2008, 06:38
For general programming.
Public Class Form1
Private Const MouseEventLeftDown As UInt32 = 2
Private Const MouseEventLeftUp As UInt32 = 4
Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As UInt32, ByVal dx As UInt32, ByVal dy As UInt32, ByVal cbuttons As UInt32, ByVal dwextrainfo As UInt32)
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Keys) As Short
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer2.Interval = 1
Timer2.Enabled = True
Timer1.Interval = 10
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = IIf(Timer1.Enabled = False, True, False)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
mouse_event(2, 0, 0, 0, 0)
mouse_event(4, 0, 0, 0, 0)
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If GetAsyncKeyState(Keys.F11) Then
Timer1.Enabled = IIf(Timer1.Enabled = False, True, False)
End If
End Sub
End Class
Add 2 timers, 1 button.
It have 2 ways to be used..
1. by asyckey, in this case, using F11 active/desactive it.
2. Using the button, but since the timer interval is set at 10ms, it's pretty hard to click and stay with AC on :P
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.