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 8828751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:40:44+00:00 2026-06-14T07:40:44+00:00

There have been a bunch of questions on how to implement a progress bar

  • 0

There have been a bunch of questions on how to implement a progress bar and I believe I have been through all of them and I still don’t know why my progress bar won’t work.

Well, it seems to work only after the operation is done, which is of course not what I want. I want the progress bar to work as the main operation is doing its thing.

My code is pretty long and painful so I’m going to simplify it to make it as basic as possible.

private void button1_Click(object sender, EventArgs e)
{
  backgroundWorker1.RunWorkerAsync();
  //Main UI Operation
}

private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
 for (int i = 1; i <= 100; i++)
  {
   // Wait 100 milliseconds.
   Thread.Sleep(100);
   // Report progress.
   backgroundWorker1.ReportProgress(i);     }
  }

private void BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs        e)
  {
   progressBar1.Value = e.ProgressPercentage;
  }

Like I said, I only see the progress bar start after my main UI operation.

WorkerReportsProgress is set to True.
Minimum and Maximum are 0 and 100 respectively.

I feel like this might be a lack of understanding on Threads.

  • 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-14T07:40:46+00:00Added an answer on June 14, 2026 at 7:40 am

    I tested the same code as you and found it worked. Did you forget to change the WorkerReportesProress property to True?

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

Sidebar

Related Questions

I know similar questions have been asked, I've tried a bunch of them (including
I know there has already been a bunch of questions similar to this, but
There have been a few similar questions with solutions, but none answered my question,
There have been several questions posted to SO about floating-point representation. For example, the
There have been many debates about this topic already here, but none of them
There have been several questions over the past few days about the proper use
There have been questions with answers on how to write rubygems, but what should
There have been some similar questions asked regarding Grid views, but none have been
I realize there have been a few other questions on this topic, and the
I'm really sorry, I realize there have been several questions asked about cocos2d touch

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.