Start New Discussion within our Software Development Community

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?

Try this

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

Hope it helps

Thanks. That worked nicely.

Can you also help me with how to make a progressbar that would update with a timer, thatd do 1% every .5 seconds? Also when the form loads.

This question has already been answered. Start a new discussion instead.