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?
linux
107
Posting Shark
Recommended Answers
Jump to PostHi,
Try thisDim 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
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.