#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("", 250, 100, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_THICKFRAME))
GUICtrlCreateLabel("", 0, 0, 250, 100, -1, $GUI_WS_EX_PARENTDRAG)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_GETMINMAXINFO, "WM_GETMINMAXINFO")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIRegisterMsg($WM_GETMINMAXINFO, "")
Exit
EndSwitch
WEnd
Func WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam)
#forceref $hWnd, $Msg, $wParam, $lParam
Local $minmaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
DllStructSetData($minmaxinfo, 7, 250) ; min width
DllStructSetData($minmaxinfo, 8, 100) ; min height
DllStructSetData($minmaxinfo, 9, 3000) ; max width
DllStructSetData($minmaxinfo, 10, 3000) ; max height
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_GETMINMAXINFO