#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$GuiMain = GUICreate("父窗口", 253, 193, 192, 124)
$Button1 = GUICtrlCreateButton("关闭本窗口,显示子窗口", 33, 128, 165, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUISetState(@SW_HIDE,$GuiMain)
$GUI_About = GUICreate("子窗口", 253, 193, -1, -1)
$But_OK = GUICtrlCreateButton("关闭本窗口,显示交窗口", 33, 128, 165, 25, 0)
GUISetState(@SW_SHOW)
While 1
$Msg_about = GUIGetMsg()
Select
Case $Msg_about = $gui_event_close Or $Msg_about = $But_OK
GUIDelete($GUI_About)
GUISetState(@SW_SHOW,$GuiMain)
GUISetState(@SW_ENABLE, $GuiMain)
ExitLoop
EndSelect
WEnd
EndSwitch
WEnd
|