Results 1 to 6 of 6

Thread: [RESOLVED] MouseMotion

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    100

    Resolved [RESOLVED] MouseMotion

    guys

    I want to put in to a frame mouse motion coordinates X,Y can u pls help?

  2. #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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    100

    Re: MouseMotion

    Thx, but it seems to have a problem on :

    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

    do i have to do someting else? do i have to add a path or something?

    Thx and good bye from far far far away

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

    Re: MouseMotion

    Code:
    Private Type POINTAPI
        X As Long
        Y As Long
    End Type



    how stupid of me.. forgot these declerations

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    100

    Re: MouseMotion

    Thanx,i ll try it again

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    100

    Re: MouseMotion

    thx it worked with a few changes

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