'宣告引用
Imports System.IO
Dim file As String
Me.ListBox1.Items.Clear()
'WINDIR請改為實際路徑如("D:\123\"),如果須指定搜尋特殊字如JPG ("D:\123\","*.JPG")
Dim files() As String = Directory.GetFiles(winDir)
For Each file In files
Me.ListBox1.Items.Add(file)
Next
沒有留言:
張貼留言