You can do something like this: #include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$widht = 600
$height = 400
$hgui = GUICreate("",$widht,$height, Default, Default, BitOR($WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_MAXIMIZEBOX))
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_RESIZED
$aPos = WinGetClientSize ($hgui)
WinMove($hgui,"",Default,Default,$aPos[0],$aPos[0]/($widht/$height))
EndSwitch
WEnd
Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
Local $aPos=MouseGetPos()
Local $aWin=WinGetPos($hWnd)
Local $imX=$aPos[0]
Local $imY=$aPos[1]
Local $iwX=$aWin[0]+$aWin[2]-8
Local $iwY=$aWin[1]+$aWin[3]-8
If not ($imX>$iwX and $imX<$iwX+8 and $imY>$iwY and $imY<$iwY+8) Then Return 0
EndFuncSaludos