[Help]Reading filenames to a listbox[Solved]
How to read the files to a listbox?
Example..
I'll Browse my Program Files by using a Folderbrowserdialog
the listbox should be showing the folders and the sub-folders with the files..
Can it be easy to make a code for it?
Also include files from the subdirectorys:
[php] For Each file As String In My.Computer.FileSystem.GetFiles(folderbrowserdialo g.selectedpath, FileIO.SearchOption.SearchAllSubDirectories)
listbox1.items.add(file)
Next[/php]
Only list the files in the selected folder:
[php]For Each file As String In My.Computer.FileSystem.GetFiles(folderbrowserdialo g.selectedpath, FileIO.SearchOption.SearchTopLevelOnly)
listbox1.items.add(file)
Next[/php]