Dim MyDir = "C:\Windows"
Dim MyInfo = MyDir + "目錄下的所有文件包括:"
For Each MyFile In System.IO.Directory.GetFiles(MyDir)
MyInfo += Environment.NewLine + MyFile
Next
Me.RichTextBox1.Text =MyInfo