本帖最后由 那片叶子 于 2009-9-29 14:53 编辑 #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
$time=10
$Form1 = GUICreate("测试", 221, 108, 415, 319)
$Checkbox1 = GUICtrlCreateCheckbox("复选1", 16, 24, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("复选2", 120, 24, 97, 17)
$Button1 = GUICtrlCreateButton("按 钮", 64, 56, 75, 22, 0)
$Progress1 = GUICtrlCreateProgress(8, 88, 201, 9)
GUISetState(@SW_SHOW)
AdlibEnable("pro1", 10 * $time)
$wait = 0
Func pro1()
GUICtrlSetData($Progress1, $wait)
For $v = 0 To $time Step 1
If GUICtrlRead($Progress1) = $v * 10 / ($time / 10) Then
;GUICtrlSetData($Labtime," " & $time-$v )
EndIf
Next
$wait = $wait + 1
If $wait = 101 Then DrvUnComp()
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
按了 按钮和附件 都不能停止进度条,请各位大侠帮我看看! |