Results 1 to 2 of 2

Thread: move mouse

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    118

    Post

    i WANT TO USE A TIMER TO MOVE THE MOUSE FROM TOP TO BOTTOM CAN ANY ONE TELL ME HOW TO DO THAT?
    tHANKS FOR AMY HELP

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    here is a pretty crude example, you can fix it up to the way you like:

    Code:
    Option Explicit
    Private Declare Function SetCursorPos Lib "user32" _
    (ByVal x As Long, ByVal y As Long) As Long
    
    Private Sub Timer1_Timer()
        Dim I As Long
        
        For I = 0 To Screen.Height
            SetCursorPos 100, I
            DoEvents
        Next I
    
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width