本帖最后由 871224 于 2009-10-19 15:13 编辑
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#NoTrayIcon
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$mainwindow = GUICreate("窗口1", 360, 260)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
$button = GUICtrlCreateButton("确定",30,200,60)
GUICtrlSetOnEvent($button, "OKButton")
GUISetState(@SW_SHOW)
While 1
Sleep(1000)
WEnd
Func OKButton()
$MainWindow_1 = GUICreate("窗口2", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked_1")
EndFunc
Func CLOSEClicked()
Exit
EndFunc
Func CLOSEClicked_1()
GUIDelete($MainWindow_1)
EndFunc
我的想点击确定,弹出窗口2,但是为什么点击了按钮,没效果呢?哪位大大帮小弟解答下,谢谢! |