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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:40:51+00:00 2026-06-04T00:40:51+00:00

I am making my first ever C# GUI. It is using a BackgroundWorker to

  • 0

I am making my first ever C# GUI. It is using a BackgroundWorker to run a computationally heavy simulation. Periodically, the simulation reports (through the ProgressChanged event) a sizable body of information that needs to be displayed in the GUI.

The GUI is divided into controls and I want each control to know how to ‘update itself’.

In my research, I found lots of ways I might be able to do this.

  • I could think of was to have the method bougnd to ProgressChanged call an update method on each part of the GUI.
  • I could Invalidate the GUI and bind each controls update method to the Validating event.
  • I could bind each control’s update method to the ProgressChanged event.
  • I could have each control implement the INotifyPropertyChanged interface (but I’m skeptical that this would work)

Of all of these options, which one is best practices for updating the entire GUI upon the ProgressChanged event? (or am I out in left field?)

From comment:

private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
  Simulation simulation = new Simulation();
  while(true)
  {
    simulation.RunIteration();
    backgroundWorker.ReportProgress(-1, simulation);
  }
}
  • 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-04T00:40:53+00:00Added an answer on June 4, 2026 at 12:40 am

    You should not have to do anything special.

    Your ProgressChanged handler can ‘unpack’ the data and set the relevant properties of controls. Invalidation and repainting is automatic and it runs on the GUI thread.

    You should only be careful with updating ‘too often’. How often is too often depends on the volume of data, the handler should be finished well before the next update. If not, build in some throttling mechanism.

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

Sidebar

Related Questions

Hi, I am making a first person shooter in directX 10 using c++. I
newcomer and first ever question here. I am using the multiprocessing module of Python
I am making a very, very simple module (it is the first I've ever
I am making a win32 application using visual studio 2008. When ever i compile
I am making my first program using Java3D. I have setup some transformGroups that
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I'm making my first steps with unit testing and am unsure about two paradigms
I apologize for making my first question not the hard-hitting code-related question I was
I am making my first web application with ASP.NET and I am having a
I am making my first program with beautifulsoup and my html file has code

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.