Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
38
Task/Mouse-position/Liberty-BASIC/mouse-position.basic
Normal file
38
Task/Mouse-position/Liberty-BASIC/mouse-position.basic
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
nomainwin
|
||||
|
||||
UpperLeftX = DisplayWidth-WindowWidth
|
||||
UpperLeftY = DisplayHeight-WindowHeight
|
||||
|
||||
struct point, x as long, y as long
|
||||
|
||||
stylebits #main.st ,0,0,_WS_EX_STATICEDGE,0
|
||||
statictext #main.st "",16,16,100,26
|
||||
|
||||
stylebits #main ,0,0,_WS_EX_TOPMOST,0
|
||||
open "move your mouse" for window_nf as #main
|
||||
|
||||
#main "trapclose [quit]"
|
||||
timer 100, [mm]
|
||||
wait
|
||||
|
||||
[mm]
|
||||
CallDll #user32, "GetForegroundWindow", WndHandle as uLong
|
||||
#main.st CursorPos$(WndHandle)
|
||||
wait
|
||||
|
||||
[quit]
|
||||
close #main
|
||||
end
|
||||
|
||||
function CursorPos$(handle)
|
||||
Calldll #user32, "GetCursorPos",_
|
||||
point as struct,_
|
||||
result as long
|
||||
Calldll #user32, "ScreenToClient",_
|
||||
handle As Ulong,_
|
||||
point As struct,_
|
||||
result as long
|
||||
x = point.x.struct
|
||||
y = point.y.struct
|
||||
CursorPos$=x; ",";y
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue