Results 1 to 6 of 6

Thread: [RESOLVED] MouseMotion

Threaded View

  1. #2
    Addicted Member Jazz00006's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: MouseMotion

    Ive been working on a totally independent mouse moving program, its quite good



    heres some code taken from it jope it helps you






    Code:
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
    End Type
    Code:
    Private Sub Timer1_Timer()
    Label1.Caption = GetCursor
    End Sub
    Code:
    Public Function GetCursor()
    Dim wndrect As RECT
    Dim mousexy As POINTAPI
    GetWindowRect SelWND, wndrect
    GetCursorPos mousexy
    GetCursor = (mousexy.X - wndrect.Left) & "," & (mousexy.Y - wndrect.Top)
    End Function
    Last edited by Jazz00006; Apr 26th, 2006 at 11:35 PM.

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