how do I make it so that i can have a listbox show the contents of files in a path, and another listbox showing directories in that drive. I do not want to use a filelistbox or a dirlistbox, since you cannot add or remove items on those.
Printable View
how do I make it so that i can have a listbox show the contents of files in a path, and another listbox showing directories in that drive. I do not want to use a filelistbox or a dirlistbox, since you cannot add or remove items on those.
If you're using VB6 or have VB5 with the Scripting Runtime installed, take a look at http://codeguru.developer.com/vb/articles/1958.shtml - it should give you a few pointers.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
You have to use the add method to add items to the listview, and the dir command to obtain files and directories.
Dir command have some options to filter files, you can find them in the online help of VB.
Remember add code at the dblclick event of listview with directories to populate the 2nd listview (files).