Results 1 to 3 of 3

Thread: total progress reports

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    total progress reports

    i know how to increase a progress bar for each item I am going to be performing my actions on (like file copy)
    but overall how can I find out the progress?

    the way its working now is:

    create an array of file extensions I wish to find of files
    foreach currentExtention in the extentions

    get files in specific directory of the extension current extension
    foreach current file in theFiles found

    increase progBar

    next

    next


    but what about doing overall progress?
    one way was to do that but get the total number of files found, set that as a maxvalue of the totalProgBar then increment that on each file copy but that would be bad practice

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: total progress reports

    The only way to provide a proportional view of the current progress is to know exactly what represents the action being complete. If your progress represents the number of files or bytes operated on then the only way to be able to provide a current progress is to know what proportion of the total that represents. That means that you must count the total number of files or bytes or whatever before you start. Have you noticed how when you copy a large number of files in Windows Explorer the progress dialogue doesn't get displayed right away? Ever wondered what Windows is doing in that time?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: total progress reports

    yes yes and yes Thanks for that, I knew it would be something like that but was not sure if I was thinking clearly, thanks!

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

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