给个最原始的例子你玩玩
Dim s As String
Dim strname(100000) As String
Dim j As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
s = Dir("c:\*.bmp")
Dim i As Integer
Do While s <> ""
strname(i) = "c:\" & s
s = Dir()
i = i + 1
Loop
If Dir(strname(j)) <> "" Then
Me.PictureBox1.ImageLocation = strname(j)
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
j = j + 1
If Dir(strname(j)) <> "" Then
Me.PictureBox1.ImageLocation = strname(j)
End If
End Sub