$GUI = GUICreate('')
GUISetState()
While 1
$MPos = MouseGetPos()
$WPos = WinGetPos($GUI)
If $MPos[0] > ($WPos[2] + $WPos[0]) Then WinMove($GUI, '', $WPos[0], $WPos[1], 500, 200)
If $MPos[1] > ($WPos[3] + $WPos[1]) Then WinMove($GUI, '', $WPos[0], $WPos[1], 200, 500)
Switch GUIGetMsg()
Case -3
Exit
EndSwitch
WEnd