|
-
Apr 26th, 2006, 11:19 PM
#1
Thread Starter
Lively Member
[RESOLVED] MouseMotion
guys
I want to put in to a frame mouse motion coordinates X,Y can u pls help?
-
Apr 26th, 2006, 11:30 PM
#2
Addicted Member
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.
-
Apr 27th, 2006, 11:56 PM
#3
Thread Starter
Lively Member
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
-
Apr 28th, 2006, 12:33 AM
#4
Addicted Member
Re: MouseMotion
Code:
Private Type POINTAPI
X As Long
Y As Long
End Type
how stupid of me.. forgot these declerations
-
Apr 28th, 2006, 02:09 AM
#5
Thread Starter
Lively Member
-
May 2nd, 2006, 08:57 AM
#6
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|