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. Better progressbar?

Better progressbar?

Scheduled Pinned Locked Moved C#
sysadminquestion
2 Posts 2 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.
  • E Offline
    E Offline
    Etienne_123
    wrote on last edited by
    #1

    Hi In my application I allow for users to upload documents to a server via a web service. I recently created a progress form to show the progress of the documents being uploaded by incrementing a progressbar and updating some labels. However, the progress bar increments are equal to the size of the current document, so it updates in blocks. Is there any way to get the current byte or kilobyte being uploaded and increment the progress bar with that to create a better looking progress bar that continuously updates?

    L 1 Reply Last reply
    0
    • E Etienne_123

      Hi In my application I allow for users to upload documents to a server via a web service. I recently created a progress form to show the progress of the documents being uploaded by incrementing a progressbar and updating some labels. However, the progress bar increments are equal to the size of the current document, so it updates in blocks. Is there any way to get the current byte or kilobyte being uploaded and increment the progress bar with that to create a better looking progress bar that continuously updates?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      if you upload by sending chunks of data, then yes you could use the exact number of bytes transferred so far. OTOH if your upload is a single action with no progress reporting, then you don't really know; you could still use a timer to have the progress bar advance corresponding to the amount of bytes in that upload, based on an assumed upload rate, which you could derive from the uploads done before, so only the first upload would have a jerky progress, and even that could be remedied by starting with either a historic upload rate, or a reasonable first estimate. So it all depends on how you upload things. Since you asked, I expect you'd be in the latter category. :)

      Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

      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