本帖最后由 afan 于 2009-8-14 14:02 编辑
例子:#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
GUICreate("我的 GUI 进度条", 220, 100, 100, 200)
$progressbar2 = GUICtrlCreateProgress(10, 40, 200, 20, $PBS_SMOOTH)
GUICtrlSetData(-1, 100)
$button = GUICtrlCreateButton("开始倒退", 75, 70, 70, 20)
GUISetState()
$s = 0; progressbar-saveposition
Do
$msg = GUIGetMsg()
If $msg = $button Then
For $i = $s To 100
$m = GUIGetMsg()
If $m = -3 Then ExitLoop
GUICtrlSetData($progressbar2, (100 - $i))
Sleep(20)
Next
Msgbox(0,0,'完成',2)
GUICtrlSetData($progressbar2, 100)
EndIf
Until $msg = $GUI_EVENT_CLOSE
|