I am writing a Backup Application using VB6. Here I need to show treeview and listivew with Directories and Files like Windows explorer and allow user to select or drag files for backup. I have populated directory tree. that is fine. But in case of listview for showing selected Directory contents with windows icons I am using Filesystemobject and then getting windows icons for the files and directories. In case of large directory it is taking time to load the files and directories. I treid with Findfirstfile and findnextfile apis also. still it is slow. Can anybody suggest me some good way of loading the files and folders in the listview with windows associated icons?
I have attached a recursive file search class using the aforementioned API this then populates two collections with both files and folders...it is very fast on my computer! You can then iterate through these files and folders through the original search class and add them to your list box after the searching is finished which should speed it because it is note adding files to the control during the recursive search!
You can use my classes providing you keep my comments intact and you email me any amendments you may make to the class!
Emails in the class!
Last edited by Ghost_Inside; Nov 12th, 2003 at 08:48 AM.
Remember to put a *.* on the directory path before passing it to my class, I done this so the same class can be used to find specific files ie c:\Temp\*.xls
Originally posted by pampatipraveen with windows associated icons?
Provided your file enumeration code isn't crap, then the performance hit is going to come from extracting the icons.
Take a look at Wokawidget's multithreaded code for finding files.
Anyway, I don't think that Veritas BakcupExec bothers to display icons. It just has a tickbox beside the filename to select if you want to back that up or not.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]