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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:11:24+00:00 2026-06-11T06:11:24+00:00

The usual practice is to show the progress window (with a progress bar) in

  • 0

The usual practice is to show the progress window (with a progress bar) in the UI thread and update the progress from the worker thread.

I have a lot of long operations which are started and run in the GUI thread itself(which temporarily freeze the GUI). The requirement is to show the progress bar for all existing long operations. The usual solution would be to move the long operations as threads and update the progress from there. But i am not sure about the thread safety of those long operations.

Is there a way where we show the progress window in another thread (so it doesn’t freeze) and then update the progress from the main GUI thread itself?

  • 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-11T06:11:25+00:00Added an answer on June 11, 2026 at 6:11 am

    I dont know a solution to show the ProgressBar in another thread, but a hack you can try ist to let the system execute its actions (Update the UI) from within your long running operations. For this, you can call the following function repeatedly from within your long running operations:

    public static void DoEvents() {
      DispatcherFrame frame = new DispatcherFrame();
      Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate(object parameter) {
        frame.Continue = false;
        return null;
    }), null);
      Dispatcher.PushFrame(frame);
    }
    

    But take care, this is not a nice way to resolve the problem. Better to chose an appropriate design.

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

Sidebar

Related Questions

My usual practice is to have a single maven project (can be multi-module) per
While doing a desing/framework it is a usual practice to have a Base Class
I have an application which I am developing using WPF\Prism\MVVM. All is going well
I have a SQL Server 2005 data-mart star schema with the usual fact and
I have written a Java application which should be started or woken up when
Is it usual practice to combine and minify external JS libraries and css files
I am relatively new to ASP.NET so I do not know the usual practice
Just wondering what is the usual practice for merging back to the master, when
What is the best practice to implement the following: we have a classes Order
I have a Wordpress-based website which uses Sphinx as a search engine, with a

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.