Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Show Progress Bar % with estimated time while uploading a file

Show Progress Bar % with estimated time while uploading a file

Scheduled Pinned Locked Moved C#
help
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    attalurisubbu
    wrote on last edited by
    #1

    Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.

    D L 2 Replies Last reply
    0
    • A attalurisubbu

      Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If you're using your own code to do the actual upload, then you can write it to provide this information. If you're using a single method call and it does the upload for you, you've got no way on getting any progress information unless the class/method you use provides such.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      1 Reply Last reply
      0
      • A attalurisubbu

        Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You can derive the "remaining time" from the current percentage. You take a timestamp at the moment that processing starts. At every progress-change, you calculate the duration to do "1%", based on the time elapsed since the start. Subtract the progress from 100%, and multiply by the duration that you calculated in the previous step. The first five seconds give a lousy avarage; it's generally a good idea to start it with the term "unknown/calculating".

        I are Troll :suss:

        A 1 Reply Last reply
        0
        • L Lost User

          You can derive the "remaining time" from the current percentage. You take a timestamp at the moment that processing starts. At every progress-change, you calculate the duration to do "1%", based on the time elapsed since the start. Subtract the progress from 100%, and multiply by the duration that you calculated in the previous step. The first five seconds give a lousy avarage; it's generally a good idea to start it with the term "unknown/calculating".

          I are Troll :suss:

          A Offline
          A Offline
          aad10
          wrote on last edited by
          #4

          Hello, I am new in silverlight. I am using silverlight 3. I want to show "time left" on preogress bar in the hh/mm/ss format. How should I do this. PLease provide detailed solution.

          L 1 Reply Last reply
          0
          • A aad10

            Hello, I am new in silverlight. I am using silverlight 3. I want to show "time left" on preogress bar in the hh/mm/ss format. How should I do this. PLease provide detailed solution.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            archabhi123 wrote:

            I am new in silverlight.

            I haven't used Silverlight yet, so it seems that you're already ahead of me :)

            archabhi123 wrote:

            I want to show "time left" on preogress bar in the hh/mm/ss format.

            To calculate how much time there's left, you'd first have to calculate how much time is required for a single step. Imagine your progressbar having 100 steps. First you'd write the code to time the first step. Next, you multiply this with the amount of steps left. If your progressbar is at 60, you'd have 40 steps left to perform - and if a step takes two seconds, you can calculate that it will (probably!) take 40 (steps) * 2 (seconds) = 80 seconds. Then you'd have to format those 80 seconds in the hh/mm/ss format and update the actual progressbar. --edit; You reacted to an somewhat older post on the forum. You might get more answers if you post it as a new question in the "Silverlight"-forum.

            I are Troll :suss:

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups