Directory.CreateDirectory("My Documents\test")
Dim dir As New DirectoryInfo("My Documents\test")
Dim files As FileInfo() = dir.GetFiles("*.jpg")
For Each file As FileInfo In files
ListView.Items.Add(file)
Next
Private Sub LoopImageCE()
Dim filePaths As String() = Directory.GetFiles("Nand\\MBApp\\Album")
Dim PictureBox As PictureBox() = New PictureBox(filePaths.Length - 1) {}
Dim CheckBox As CheckBox() = New CheckBox(filePaths.Length - 1) {}
Dim begin As Integer = 0
Dim beginChk As Integer = 0
For i As Integer = 0 To filePaths.Length - 1
PictureBox1(i) = New System.Windows.Forms.PictureBox()
PictureBox(i).BackColor = System.Drawing.Color.FromArgb(CInt(CByte(128)), CInt(CByte(192)), CInt(CByte(255)))
PictureBox(i).Location = New System.Drawing.Point(begin, 0)
PictureBox(i).Name = "pictureBox1"
PictureBox(i).Size = New System.Drawing.Size(75, 55)
PictureBox(i).SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.Controls.Add(PictureBox(i))
begin += 85
CheckBox(i) = New System.Windows.Forms.CheckBox()
CheckBox(i).Location = New System.Drawing.Point(beginChk, 60)
CheckBox(i).Name = "checkBox1"
CheckBox(i).Size = New System.Drawing.Size(20, 20)
CheckBox(i).TabIndex = 3 + i
Me.Controls.Add(CheckBox(i))
beginChk += 85
Next
Dim c As Integer = 0
For Each Path As String In filePaths
Dim myImage As Image = New Bitmap(Path)
PictureBox(c).Image = myImage
c += 1
Next
End Sub