looking for a simple sample code in vb.net

  • Thread starter Thread starter something007
  • Start date Start date
S

something007

Guest
need to do a explore kinda file browser.
which using a treeview and a listview, i don't want to use the driver and file control that was in vb6, any example that does this with a filesystemobject?
i tried mine just not working which can read all the folders in all the other drivers except the root driver where my winxp is installed.
 
I did this once before, I used the methods of the System.IO.Directory class instead of the FileSystemObject. A useful hint is not to recurse all files and folders until the user expands each directory in the treeview, just recurse enough to figure out if the directories need a + before them.
 
divil said:
I did this once before, I used the methods of the System.IO.Directory class instead of the FileSystemObject. A useful hint is not to recurse all files and folders until the user expands each directory in the treeview, just recurse enough to figure out if the directories need a + before them.

thanks for answering.
what is the difference between system.io.directory and filesystemobject?

i didn't recurse at all, what i did just scan the drivers first, then give each driver a dummy node, then when user expand it, then i read all the folders under that driver, not include subfolders, i put another dummy head under the node where there is subfolder.

the problem is the code works for all other drivers, included CD-driver, just not my D: where winxp is installed. is there any known problem of fso with root driver where winxp is?
 
Not as far as I know, but then, I don't use the FileSystemObject. If I were you, I'd use the native .NET methods located in the System.IO.Directory class.
 
Back
Top