在vb中,在form1中有一个进度条和timer,用timer控制进度条,14秒时间结束,进度条消失。代码怎么写呢?
2个回答
展开全部
'自己换成进度条稍作修改即可
Private Sub Form_Load()
HScroll1.Max = 14
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static n
If n = 15 Then
Timer1.Interval = 0
HScroll1.Visible = False
Exit Sub
End If
HScroll1.Value = n
n = n + 1
End Sub
Private Sub Form_Load()
HScroll1.Max = 14
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static n
If n = 15 Then
Timer1.Interval = 0
HScroll1.Visible = False
Exit Sub
End If
HScroll1.Value = n
n = n + 1
End Sub
展开全部
Private Sub Form_Load()
HScroll1.Max = 14
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static i%
i = i + 1
HScroll1.Value = i
Timer1.Enabled = i < 14
HScroll1.Visible = i < 14
End Sub
HScroll1.Max = 14
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static i%
i = i + 1
HScroll1.Value = i
Timer1.Enabled = i < 14
HScroll1.Visible = i < 14
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询