我需要帮助在运行时显示图片框
Private Sub LoadCards()
Dim Cards As New PictureBox
For i As Integer = 0 To imglist1.Images.Count - 1
Cards.Image = imglist1.Images(i)
Next i
End Sub
答案 0 :(得分:0)
请先将您的照片框添加到表单中,如下所示:
Dim Cards As New PictureBox
Cards.Width = 100 'or whatever
Cards.Height = 200
Cards.Top = 50 'or whatever
Cards.Left = 50
Me.Controls.Add(Cards)
然后进行操作,虽然这里的For
循环没有多大意义:
For i As Integer = 0 To imglist1.Images.Count - 1
Cards.Image = imglist1.Images(i)
Next i