Click here to Skip to main content
15,891,473 members
Articles / Desktop Programming / Windows Forms

Wait progress bar for long running UI operations

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
3 Feb 2012CPOL 14.2K   4  
Hello!Here is a small article - Show progress on long-running operations, which describes approach to keep the UI responsive, starting long-running operations in separate thread. This approach is native and without any 3d-party libraries and even without BackgroundWorker.For example, the...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
20 Sep 2011kris444 3 alternatives  
Showing progress bar while performing time consume processes.
Please Sign up or sign in to vote.
2 Oct 2011Anshul R
You can use BackgroundWorker to do the work and report the progress using:private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e){ this.progressBar1.Value = e.ProgressPercentage;}
Please Sign up or sign in to vote.
7 Oct 2011Bruce Lee Harrison
The background method is probably the most preferred method, but I've found this one is very easy to implement, and it's just one short line:BeginInvoke(new Action(() => progressBar1.Increment(1)));Place this in your worker thread to report to the UI. Not sure how "good" this is, but it...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions