|
发表于 2010-11-6 13:22:46
|
显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 379, 246, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 80, 72, 193, 65)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Form2 = 0
$delete_form2 = 0
While 1
Sleep(1000)
If $delete_form2 = 1 Then
GUIDelete($Form2)
$delete_form2 = 0
EndIf
WEnd
Func Button1Click()
$Form2 = GUICreate("Form2", 379, 246, 292, 214)
$Button2 = GUICtrlCreateButton("Button2", 80, 72, 193, 65)
GUICtrlSetOnEvent(-1, "Button2click")
GUISetState(@SW_SHOW)
EndFunc
Func Button2Click()
$delete_form2 = 1
EndFunc |
|