ich habs bisher immer so geregelt.
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("fenster 1", 226, 130, 192, 124)
$Button1 = GUICtrlCreateButton("neues fenster", 10, 52, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
go()
func go()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
go1()
EndSwitch
WEnd
endfunc
func go1()
$Form1 = GUICreate("fenster 2", 226, 130, 192, 124)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_hide)
go()
EndSwitch
WEnd
endfunc