Originally Posted by
FLAMESABER
Although the problem is solved, here is a nice mouse move effect I just created. Its simple. It smoothly takes the cursor to the position you want. Not like directly jumping to the co-ordinates !!
First declare these:
[php]
'Set the x and y co-ordinates to your adjustments... In this case it will take the cursor to start menu.
Dim x As Integer = 10
Dim y As Integer = Screen.PrimaryScreen.Bounds.Height - 20
Public Declare Function SetCursorPos Lib "user32" (ByVal X As Integer, ByVal Y As Integer) As Integer
Dim i As Integer = MousePosition.Y
Dim j As Integer = MousePosition.X
Dim boolx As Boolean = False
Dim booly As Boolean = False[/php]
Then add a timer and set its interval to 1. Then add the following code in the timer:
[php]If Not boolx Then
If x <= j Then
SetCursorPos(j, i)
j -= 4
Else
SetCursorPos(j, i)
j += 4
boolx = True
End If
End If
If Not booly Then
If y <= i Then
SetCursorPos(j, i)
i -= 4
Else
SetCursorPos(j, i)
i += 4
If boolx Then
booly = True
End If
End If
End If[/php]
Now run the application. The code might not be perfect. It needs improvement...Just posted to give you an idea.
Enjoy smooth mouse ride.