|
-
Mar 13th, 2000, 02:47 AM
#1
Thread Starter
New Member
here's the deal:
how do I create a prog that makes the computer think the the mouse has been moved and this must happen every 20 seconds. Any ideas?
-
Mar 13th, 2000, 03:16 AM
#2
Hyperactive Member
Do you want to actually move it, (you can hide it), or just make the pc think it has, because the former is easy:
use API viewer to get SetCursorPos
then:
SetCursorPos AnyNumber, AnyNumber
Optionally, you can hide it with the API ShowCursor:
ShowCursor False
finally, put the SetCursorPos in a timer with interval 20 secs.
Not sure if that's what u want, but soemone might find it useful 
buzzwords are the language of fools
-
Mar 13th, 2000, 03:26 AM
#3
You can use SetCursorPos API to move the cursor.
Just add the Timer control to your form and set it's Interval property to 20000. Then place this code on Timer event of the Timer control:
Code:
Private Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Private Sub Timer1_Timer()
Dim x As Long
Dim y As Long
Randomize
x = (Rnd * 9) * 100
y = (Rnd * 9) * 100
Call SetCursorPos(x, y)
End Sub
This will move the cursor to a different position every time the Timer event fires.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|