在vb中如何利用timer控件使image控件循环不断得载入六张图片
1个回答
展开全部
在loadpicture里写入图片路径
Private Sub Form_Load()
Timer1.Interval = 2000
End Sub
Private Sub Timer1_Timer()
Static i As Integer
i = i + 1
Select Case i
Case Is = 1
Image1.Picture = LoadPicture()
Case Is = 2
Image1.Picture = LoadPicture()
Case Is = 3
Image1.Picture = LoadPicture()
Case Is = 4
Image1.Picture = LoadPicture()
Case Is = 5
Image1.Picture = LoadPicture()
Case Is = 6
Image1.Picture = LoadPicture()
End Select
If i = 6 Then i = 0
End Sub
Private Sub Form_Load()
Timer1.Interval = 2000
End Sub
Private Sub Timer1_Timer()
Static i As Integer
i = i + 1
Select Case i
Case Is = 1
Image1.Picture = LoadPicture()
Case Is = 2
Image1.Picture = LoadPicture()
Case Is = 3
Image1.Picture = LoadPicture()
Case Is = 4
Image1.Picture = LoadPicture()
Case Is = 5
Image1.Picture = LoadPicture()
Case Is = 6
Image1.Picture = LoadPicture()
End Select
If i = 6 Then i = 0
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询