Here is some code which tells you what the current mouse position is
(of course it depends on where the button is to run it.<<grin>>). This
may save you having to check a few million pixels one by one.
'-----------------------------
'- Get mouse co-ordinates
Type POINTAPI
x As Long
y As Long
End Type
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As
Long
Dim z As POINTAPI
'------------------------------
Sub Mouse_XY()
GetCursorPos z
MsgBox ("Mouse X : " & z.x & vbCr & "Mouse Y : " & z.y)
End Sub
'------------------------------------------------------
'
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.