VB如何实现进度条

[复制链接]
查看11 | 回复2 | 2011-4-12 12:50:21 | 显示全部楼层 |阅读模式
如图显示,运行窗口form3的时候,进度条开始运行进度,当运行到百分之20的时候在标签1显示文字“123”然后运行到百分之50的时候,在标签1显示“456”进度到百分之百的时候,显示为“789”
回复

使用道具 举报

千问 | 2011-4-12 12:50:21 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">添加进度条控件方法:
工程-部件-Microsoft WIndows Common Controls 5.0
添加后,选择左侧的ProgressBar控件,添加到窗体,添加Timer控件,Interval为1000,添加Label1。
代码部分:




Private Sub Timer1_Timer()
If ProgressBar1.Value100 Then
ProgressBar1.Value = ProgressBar1.Value 10
End If
If ProgressBar1.Value = 20 Then
Label1.Caption = \"123\"
Else
If ProgressBar1.Value = 50 Then
Label1.Caption = \"456\"
Else
If ProgressBar1.Value = 100 Then
Label1.Caption = \"789\"
End If
End If
End If

End Sub

















<h4 class=\"ask\">追问





<pre class=\"replyask-text\" id=\"content-4192415\">恩恩 可以啦 ,,问个题外话 那个时钟怎么调呢? 1000代表多长时间??
回复

使用道具 举报

千问 | 2011-4-12 12:50:21 | 显示全部楼层
<pre class=\"replyask-text\" id=\"content-4193095\">1000代表1秒
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行