方法很多,提供二个思路 方法一:把图片文件使用号码编号,比如p01.jpg\p02.jpg if page=0 or page="" then page=1 end if if len(cstr(page))=1 then p="0" & cstr(page)) '本程序只能少于99张图 else p=cstr(page) end if filename="p"& p & ".jpg"
Private Sub Command1_Click() '下一张按钮 Static i As Integer If i = 1 Then Picture1.Picture = LoadPicture("app.Path & filename") ElseIf i = 2 Then Picture1.Picture = LoadPicture("app.Path & filename") ElseIf i = 3 Then ... ... ... Else i = 1 End If i = i + 1 End Sub
Private Sub Command6_Click() Static a As Integer If i = 1 Then Image1.Picture = LoadPicture("D:\Bmp图片\2.bmp") ElseIf i = 2 Then Image1.Picture = LoadPicture("D:\Bmp图片\3.bmp") ElseIf i = 3 Then Image1.Picture = LoadPicture("D:\Bmp图片\4.bmp") Else i = 1 End If i = i + 1 End Sub 不行啊 点了没反应 刚开始我也是这么写的...