楼主是这个样子的吗?#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$windows1 = GUICreate( "窗口切换测试a",200, 200)
$btn1=GUICtrlCreateButton("进入",50,50,100,30)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $btn1
login()
EndSwitch
WEnd
Func login()
GUIDelete ($windows1)
win2()
EndFunc
Func win2()
$windows2=GUICreate("窗口切换测试b",300,300)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Quit()
Exit
EndSwitch
If $GUI_EVENT_CLOSE Then GUISwitch($windows2)
GUISetState()
WEnd
EndFunc
Func Quit()
GUISetState(@SW_HIDE)
Exit
EndFunc
|