#include <Date.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $i
GUICreate("计时", 300, 200)
$Label1 = GUICtrlCreateLabel("准备就绪", 50, 80, 180, 50, $SS_CENTER)
GUICtrlSetFont(-1, 15, 800, 0, "楷体_GB2312")
$Time = GUICtrlCreateLabel(_Now(), 180, 180)
GUICtrlCreateLabel('系统时间:', 120, 180, 60, 50)
GUISetState(@SW_SHOW)
AdlibRegister('Begin', 1000)
While 1
If _Now() <> GUICtrlRead($Time) Then GUICtrlSetData($Time, _Now())
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
EndSwitch
WEnd
Func Begin()
$i += 1
GUICtrlSetData($Label1, "已开始" & $i & "秒")
EndFunc ;==>Begin
|