#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 287, 197, 192, 124)
$Button1 = GUICtrlCreateButton("开始", 40, 56, 201, 81)
$Button2 = GUICtrlCreateButton("结束", 40, 56, 201, 81)
GUICtrlSetState($Button2, $GUI_HIDE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
;~ MsgBox(0, 0, "开始")
GUICtrlSetState($Button2, $GUI_SHOW)
GUICtrlSetState($Button1, $GUI_HIDE)
Case $Button2
;~ MsgBox(0, 0, "结束")
GUICtrlSetState($Button1, $GUI_SHOW)
GUICtrlSetState($Button2, $GUI_HIDE)
EndSwitch
WEnd
按照你开始说的做不是挺好 |