I want to add a list box onto a form, and have it (once the form loads), it'll list all of the files in
C:\WINDOWS\ . Is there any easy way to accomplish this?
Jump to Post
Dim folderInfo As New IO.DirectoryInfo("c:\windows") Dim arrFilesInFolder() As IO.FileInfo Dim fileInFolder As IO.FileInfo arrFilesInFolder = folderInfo.GetFiles("*.*") For Each fileInFolder In arrFilesInFolder ListBox1.Items.Add(fileInFolder.Name) Next
Hope it helps
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.