发布网友 发布时间: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