As vezes desenvolvemos aplicações que necessitam mostrar
a posição do mouse na tela.
Global
Type POINTAPI
x As Long
y As Long
End Type
Declare Function SetCursorPos Lib “user32” (ByVal x As Long, ByVal y As Long) As Long
Declare Sub GetCursorPos Lib “user32” (lpPoint As POINTAPI)
Global MOUSE_XY As POINTAPI
Global xy_mostrar As Boolean, xy_ocultar As Boolean
Sub GetMouse()
Call GetCursorPos(MOUSE_XY)
End Sub
Form
Call GetMouse
Label1.Caption=MOUSE_XY.y
Label2.Caption=MOUSE_XY.x