Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Wait progress bar for long running UI operations

, 7 Oct 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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...
The background method is probably the most prefered method, but I've found this one is very easy to implement, and its 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 works well in a small image conversion program i wrote.

License

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

Share

About the Author

Bruce Lee Harrison

United States United States
No Biography provided

Comments and Discussions

 
GeneralSo you will end up waiting if process completes or showing u... Pinmemberkris44427-Oct-11 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 7 Oct 2011
Article Copyright 2011 by Bruce Lee Harrison
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid