#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 633, 451, 192, 124)
$Button1 = GUICtrlCreateButton("进入Form", 48, 40, 81, 41, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUI()
EndSwitch
WEnd
Func GUI()
GUISetState(@SW_HIDE,$Form1)
$Form = GUICreate("Form", 397, 253, 192, 124)
$Button2 = GUICtrlCreateButton("返回Form1", 48, 40, 81, 41, 0)
GUISetState(@SW_SHOW)
While 1
$MsgForm = GUIGetMsg()
Select
Case $MsgForm = $gui_event_close Or $MsgForm = $Button2
GUIDelete($Form)
GUISetState(@SW_SHOW,$Form1)
GUISetState(@SW_ENABLE,$Form1 )
ExitLoop
EndSelect
WEnd
EndFunc
是这样吗?
[ 本帖最后由 lxz 于 2009-4-21 06:49 编辑 ] |