|
|
|
|
|
Dicas
|
|
Visual Basic (ActiveX/Controles/DLL)
|
|
|
Título da Dica: Tremer Mouse
|
|
|
|
Postada em 6/3/2007 por Edinei
neisjb@hotmail.com
' precisa de um CommandButton nome cmdTremer e a Caption "Tremer Mouse" ,e um Timer
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 Type POINTAPI x As Long y As Long End Type
Private Sub Timer1_Timer() Dim Pos As POINTAPI GetCursorPos Pos Call SetCursorPos(Pos.x + Random(20) - 10, Pos.y + Random(20) - 10) End Sub
Private Function Random(Num As Integer) Random = Int(Rnd * Num) End Function
Private Sub cmdTremer_Click() If cmdTremer.Caption = "Tremer Mouse" Then Timer1.Interval = 1 cmdTremer.Caption = "Normalizar Mouse" Else Timer1.Interval = 0 cmdTremer.Caption = "Tremer Mouse" End If End Sub
|
|
|
|
|