展开全部
添加文件列表控件,filelist
Dim Shunxu As Integer, zongshu As Integer, strfilename As String
Private Sub Form_Load()
File1.Path = "d:\" ' "d:\123\图片文件夹" '文件夹路径
File1.Pattern = "*.gif" '文件格式
Timer1.Interval = 1000
Timer1.Enabled = True
zongshu = File1.ListCount '总数
Shunxu = 0
End Sub
Private Sub Timer1_Timer()
If zongshu > 0 Then
strfilename = File1.List(Shunxu) '图片文件名
Image1.Picture = LoadPicture(File1.Path + "\" + strfilename) '图片文件路径
Shunxu = Shunxu + 1
If Shunxu = zongshu - 1 Then
Shunxu = 0
End If
End If
End Sub
Dim Shunxu As Integer, zongshu As Integer, strfilename As String
Private Sub Form_Load()
File1.Path = "d:\" ' "d:\123\图片文件夹" '文件夹路径
File1.Pattern = "*.gif" '文件格式
Timer1.Interval = 1000
Timer1.Enabled = True
zongshu = File1.ListCount '总数
Shunxu = 0
End Sub
Private Sub Timer1_Timer()
If zongshu > 0 Then
strfilename = File1.List(Shunxu) '图片文件名
Image1.Picture = LoadPicture(File1.Path + "\" + strfilename) '图片文件路径
Shunxu = Shunxu + 1
If Shunxu = zongshu - 1 Then
Shunxu = 0
End If
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询