| |
|
|
| Julian57 (07.08.11)
... windowstyle 64+16+1024
window 0,0-0,0
SetWindowPos %hwnd=%MaxX-380,(%MaxY-80) - 120,35;-1
Mensajes del usuario 513
cls RGB(255,0,0)
mientras que 1
waitinput
caso iskey(27) : end
caso %uMessage=513 : hWnd.moveByMouse
Endwhile
proc hWnd.moveByMouse
declarar mpos#,x1&,y1&, x2&,y2&
dim mpos#,8
external("user32","GetCursorPos",mpos#)
var wix&=%winLeft-long(mpos#,0)
var wiy&=%winTop-long(mpos#,4)
mientras que iskey(1)
external("user32","GetCursorPos",mpos#)
x1&=(long(mpos#,0)+wix&)
caso x1&<workarea("Links") : x1&=workarea("Links")
caso x1&>workarea("Rechts")-(%winRight-%winLeft) : x1&=workarea("Rechts")-(%winRight-%winLeft)
y1&=(long(mpos#,4)+wiy&)
caso y1&<workarea("Oben") : y1&=workarea("Oben")
caso y1&>workarea("Unten")-(%winBottom-%winTop) : y1&=workarea("Unten")-(%winBottom-%winTop)
setWindowPos %hWnd=x1&,y1& - (%winRight-%winLeft),(%winBottom-%winTop);0
Endwhile
disponer mpos#
endProc
Proc workarea
DEF SysParameterInfo(4) ! "user32","SystemParametersInfoA"
Parámetros position$
Declarar Rect#,x%
Dim Rect#,16
SysParameterInfo(48,0,Rect#,0)
caso position$="Links" : x%=Largo(Rect#,0)
caso position$="Oben" : x%=Largo(Rect#,4)
caso position$="Rechts" : x%=Largo(Rect#,8)
caso position$="Unten" : x%=Largo(Rect#,12)
Disponer Rect#
Volver x%
ENDPROC
|
|
|
| |
|
|