Probiers mal so:
[autoit]#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("testgui", @DesktopWidth, @DesktopHeight,0,0,$WS_POPUPWINDOW)
GUISetState()
While True
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
des klappt bei mir ganz gut