VB中进度条怎么使用

发布网友 发布时间:2022-04-22 04:02

我来回答

2个回答

热心网友 时间:2023-11-19 11:58

Private Sub Command1_Click()
Timer1.Enabled = True
End Sub

Private Sub Form_Load()
ProgressBar1.Max = 20
ProgressBar1.Min = 0
Timer1.Enabled = False
Timer1.Interval = 1000
End Sub

Private Sub Timer1_Timer()
If ProgressBar1.Value = 20 Then
MsgBox "完"
Timer1.Enabled = False
Else
ProgressBar1.Value = ProgressBar1.Value + 1
End If
End Sub

热心网友 时间:2023-11-19 11:58

private sub form_load()
timer1.enabled=false
timer1.interval=100
progressbar1.max=200
progressbar1.min=0
end sub

private sub command1_click()
timer1.enabled=true
progressbar1.value=0
end sub

private sub timer1_timer()
with progressbar1
.value=.value+1
if .value=200 then
timer1.enabled=false
msgbox "走完"
end if
end with
end sub

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com