Results 1 to 4 of 4

Thread: loading folders/files in listview is slow ???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    94

    Thumbs up loading folders/files in listview is slow ???

    Hi,

    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?

    thanking you

    regards
    praveenp

  2. #2
    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!
    Attached Files Attached Files
    Last edited by Ghost_Inside; Nov 12th, 2003 at 08:48 AM.

  3. #3
    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

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: loading folders/files in listview is slow ???

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width