DarkBoost,
Easy when you know how!
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $GUIMINWID = 300, $GUIMINHT = 100;set your restrictions here
Global $GUIMAXWID = 800, $GUIMAXHT = 500
GUIRegisterMsg($WM_GETMINMAXINFO, "WM_GETMINMAXINFO")
$hGUI = GUICreate("Test", 500, 500, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
GUISetState()
$aPos = WinGetPos($hGUI)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_MAXIMIZE
;WinMove($hGUI, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3])
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_GETMINMAXINFO($hwnd, $Msg, $wParam, $lParam)
$tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
DllStructSetData($tagMaxinfo, 7, $GUIMINWID) ; min X
DllStructSetData($tagMaxinfo, 8, $GUIMINHT) ; min Y
DllStructSetData($tagMaxinfo, 9, $GUIMAXWID ); max X
DllStructSetData($tagMaxinfo, 10, $GUIMAXHT ) ; max Y
Return 0
EndFunc ;==>WM_GETMINMAXINFO
All clear?
M23