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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:27:06+00:00 2026-05-30T13:27:06+00:00

i am new to this backgroundworker thing i have read some articles about how

  • 0

i am new to this backgroundworker thing
i have read some articles about how to create one
this is what it produced

    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    {
        Bitmap imgbox = new Bitmap(pictureBox.Image);

        int imgHeight = imgbox.Height;
        int imgWidth = imgbox.Width;

        int counter = 1;

        MinMaxWidth = imgWidth - 50;
        MaxWidth = imgWidth;

        try
        {
            Color c;
            //Color c2;

            for (int i = 0; i < imgbox.Width; i++)
            {
                for (int j = 0; j < imgbox.Height; j++)
                {
                    c = imgbox.GetPixel(i, j);
                    string cn = c.Name;
                    counter++;
                    backgroundWorker1.ReportProgress(counter);
                }
            }
            MessageBox.Show("SUCESSFULLY DONE");
        }
        catch (Exception ex) { MessageBox.Show(ex.Message); }
    }

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

but when i started the DoWork event. this error showed up

This BackgroundWorker states that it doesn’t report progress.
Modify WorkerReportsProgess to state that it does report progress.

ijust follow what the tutorial says
what would be the problem?, is there something that i forgot?

  • 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-05-30T13:27:07+00:00Added an answer on May 30, 2026 at 1:27 pm

    As the error suggests, set the WorkerReportsProgress property of your BackgroundWorker component to true.

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

Sidebar

Related Questions

I typically have code like this on a form: private void PerformLongRunningOperation() { BackgroundWorker
One thing that's always confused me is how a BackgroundWorker seems to have thread-safe
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; while
I am new this sharepoint development and i have task in hand to do
Im new to this.I have a cron file called xml.php and i want to
I'm totally new to this WCF Services thing so any guidelines would be greatly
I have a PyQt program, in this program I start a new thread for
I have a loop in a BackgroundWorker that saves some stuff via xml Serialization
new to this site so sorry if this question is inappropriate, or in the
New to this library (no more familiar with BeautifulSoup either, sadly), trying to do

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.