does someone know how to read the mouse position
when the mouse is on the desktop ?
maybe it is very simple , but i'm a biginner
(registered PureBasic user)


I think that you have to use the WIN API at this time to get the position. Something like this:Originally posted by crown
does someone know how to read the mouse position
when the mouse is on the desktop ?
maybe it is very simple , but i'm a biginner![]()








Code: Select all
; Creates exe size of 12,320 bytes.
OpenConsole()
OpenWindow(0,0,0,0,0,#PB_Window_Invisible,"")
x=WindowX()+WindowMouseX() : y=WindowY()+WindowMouseY()
PrintN(Str(x)) : PrintN(Str(y)) : Input() : End
;
; Creates exe size of 7,200 bytes.
OpenConsole()
GetCursorPos_(mouse.POINT) : x=mouse\x : y=mouse\y
PrintN(Str(x)) : PrintN(Str(y)) : Input() : End


