WindowTitle "Koordinaten-Helfer"
Def GetSysColor(1) !"USER32","GetSysColor"
Window 0,0-640,480
SetTrueColor 1
Cls getSysColor(15)
Declare x%,y%,x2%,y2%
MessageBox("Bitte legen sie jetzt die Größe mit der Maus fest!","Khelf",64)
WaitMouse
x%=%mouseX
y%=%mouseY
While %MousePressed
If Or(GT(x2%,%mouseX),Gt(y2%,%mouseY))
Cls GetSysColor(15)
EndIf
Rectangle x%,y%-%mouseX,%mouseY
x2%=%mouseX
y2%=%mouseY
Wend
WindowTitle Add$(Add$(Add$(Add$("Create(Object,%hwnd,Name,",x%),Add$(",",y%)),Add$(",",x2%)),Add$(",",Add$(y2%,")")))
WaitMouse
End