如下这样,出错为什么
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("父窗口", 381, 205, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 128, 56, 105, 65, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg(1)
Select
Case $nMsg(0)=$Button1
$Form2 = GUICreate("子窗口", 381, 205, 192, 124)
$Button2 = GUICtrlCreateButton("Button2", 128, 56, 105, 65, $WS_GROUP)
GUISetState(@SW_SHOW)
Case $nMsg(0)=$GUI_EVENT_CLOSE
If $nMsg(1)=$Form2 Then
GUIDelete()
ElseIf $nMsg(1)=$Form1 Then
GUIDelete()
Exit
EndIf
EndSelect
WEnd |