展开全部
在 通用 里声明一个变量 dim i as Integer
在 窗体加载的时候i=1
Private Sub Timer1_Timer()
if i>5 then i=1
Picture1.Picture = LoadPicture(App.Path + "\1" & i & ".jpg")
End Sub
在 窗体加载的时候i=1
Private Sub Timer1_Timer()
if i>5 then i=1
Picture1.Picture = LoadPicture(App.Path + "\1" & i & ".jpg")
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static i As Integer
i = (i + 1) Mod 5
Picture1.Picture = LoadPicture(App.Path & "\" & (11 + i) & ".jpg")
End Sub
假定你的图片为:11.jpg-15.jpg,如果有更多,自己修改一下即可,比如:
Private Sub Timer1_Timer()
Static i As Integer
i = i + 1
If i > 15 Then i = 1
Picture1.Picture = LoadPicture(App.Path & "\" & i & ".jpg")
'Picture1.Picture = LoadPicture(App.Path & "\" & Right("0" & i, 2) & ".jpg")
End Sub
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static i As Integer
i = (i + 1) Mod 5
Picture1.Picture = LoadPicture(App.Path & "\" & (11 + i) & ".jpg")
End Sub
假定你的图片为:11.jpg-15.jpg,如果有更多,自己修改一下即可,比如:
Private Sub Timer1_Timer()
Static i As Integer
i = i + 1
If i > 15 Then i = 1
Picture1.Picture = LoadPicture(App.Path & "\" & i & ".jpg")
'Picture1.Picture = LoadPicture(App.Path & "\" & Right("0" & i, 2) & ".jpg")
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
哇...就每隔一秒把 pic的路径换一次咯..!
追问
Private Sub Timer1_Timer()
Picture1.Picture = LoadPicture(App.Path + "\11.jpg")
Picture1.Picture = LoadPicture(App.Path & "\12.jpg")
Picture1.Picture = LoadPicture(App.Path & "\13.jpg")
Picture1.Picture = LoadPicture(App.Path & "\14.jpg")
Picture1.Picture = LoadPicture(App.Path & "\15.jpg")
End Sub
但只有一个图片啊,换不了
追答
test=11
Picture1.Picture = LogadPicture(App.path + "\" + test + ".jpg")
test=test+1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |