Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8439103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:54:52+00:00 2026-06-10T07:54:52+00:00

The progress bar is going to 70 just fine. It’s when I go to

  • 0

The progress bar is going to 70 just fine. It’s when I go to update it when the loop starts that the bar doesn’t move.

int count = finalFiles.Length; //finalFiles in an array and it varies in size.
int current = 0;

private void uploadWorker_DoWork(object sender, DoWorkEventArgs e)
{  
      uploadWorker.ReportProgress(20);

      DoSomeWork();

      uploadWorker.ReportProgress(50);

      DoMoreWork();

      uploadWorker.ReportProgress(70);

      foreach (string file in finalFiles)
      {
           current++; 
           doProcess();
           uploadWorker.ReportProgress(current / count * 30 + 70);
      }
}

Again, the problem is that the progress bar is not updating once it reaches 70. It just doesn’t move. The form does not lock up by the way because I’m using background worker.

Does anyone know why that is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:54:54+00:00Added an answer on June 10, 2026 at 7:54 am

    You have an integer current, and an integer count. Since count is bigger, when you do the division it is always 0 (integer division) until current reaches current. You should either make count a double/decimal, or cast one of the two to a double/decimal before doing the division.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to show a progress bar while my process is going on...in
I am trying to show a progress bar while my process is going on...in
i have used progress bar in my application..my application is working fine but the
I am using a progress bar in android, so that till my data is
I am trying to develop a progress bar. I am going to increase the
I'm planning to create a custom progress bar control, that supports progress sectioning. The
I'm going to be doing a progress bar for a donations page on a
I'm trying to get a progress bar going with delayed job but I don't
I have a progress bar that I want to change color depending on a
I want set progress bar until the next activity start.That mean i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.