#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$jhwl = GUICreate("test", 262, 80, 193, 115)
$Button1 = GUICtrlCreateButton("开始", 32, 32, 75, 25, 0)
$Button2 = GUICtrlCreateButton("停止", 128, 32, 75, 25, 0)
GUICtrlSetState($Button2, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_ENABLE)
Case $Button2
GUICtrlSetState($Button2, $GUI_DISABLE)
GUICtrlSetState($Button1, $GUI_ENABLE)
EndSwitch
WEnd
这样的吧? |