How do you see the x,y cordinates outside a form and how do you make the mouse cursor invisible
Printable View
How do you see the x,y cordinates outside a form and how do you make the mouse cursor invisible
Try this...
Public Type POINTAPI
x As Long
y As Long
End Type
Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Go see MouseMove Event Post. You get more than an answer
where would i put the code that you just wrote?
in general
or a form
or a module?
anywhere you want ;-)...
you could put it as private in a form, or in a module as public to anything.
With the ShowCursor API function will be able to show/hide a mouse cursor anywhere + anytime you want it to be.
Code:Option Explicit
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Command1_Click()
'Hide the mouse cursor
ShowCursor False
End Sub
Private Sub Command2_Click()
'Display the mouse cursor
ShowCursor True
End Sub