2个回答
展开全部
窗体上有一个按钮,一个进度条,一个Timer控件:
Private Sub Command1_Click()
ProgressBar1.Min = 0
ProgressBar1.Max = 100
ProgressBar1.Value = 0
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 10
If ProgressBar1.Value = 60 Then
Timer1.Enabled = False
MsgBox "10秒到了"
End If
End Sub
Private Sub Command1_Click()
ProgressBar1.Min = 0
ProgressBar1.Max = 100
ProgressBar1.Value = 0
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 10
If ProgressBar1.Value = 60 Then
Timer1.Enabled = False
MsgBox "10秒到了"
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询