找回密码
 加入
搜索
查看: 2124|回复: 2

进度条循环运行

[复制链接]
发表于 2010-1-24 22:24:01 | 显示全部楼层 |阅读模式
怎样让进度条循环运行(假进度条),当程序结束时自动关闭?
发表于 2010-1-24 22:33:26 | 显示全部楼层
用图片拼~
发表于 2010-1-24 22:44:41 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 406, 102, 192, 124)
$Progress1 = GUICtrlCreateProgress(24, 48, 361, 20)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$n=0
$t = Random(5, 20, 1)
AdlibRegister("_eee", 200)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Func _eee()
        If $n = $t Then
                GUICtrlSetData($Progress1, 0)
                $t = Random(5, 20, 1)
                $n = 0
        Return        
        EndIf
        $n += 1
        GUICtrlSetData($Progress1, Int(100 / $t * $n))
EndFunc   ;==>_eee
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 14:30 , Processed in 0.076863 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表