Windows Develop Bookmark and Share   
 index > Windows Forms General > Progress Bar does is not updated!!!
 

Progress Bar does is not updated!!!

Hi, i have a form with 2 progressbars. When i change the value of the progressbar the form is not redrawn. I tried using the refresh method but that doesn´t seem to work.

Any thoughts, please...
MigrationUser 1  Wednesday, November 12, 2003 8:04 AM
If you doing a lot of processing in a tight-loop and trying to update the ProgressBar, that may not work.  The ProgressBar needs to be able to process Paint messages to redraw itself.  You may need to processing in a background thread so that the UI thread is free to redraw the ProgressBar.
MigrationUser 1  Wednesday, November 12, 2003 12:54 PM
Pedro is right.  Calling Application.DoEvents() may help whenever the progressbar value is updated. Also, if you have a working thread that updates the progressbar, don't forget to do it via an Invoke or BeginInvoke call. You cannot update the UI controls from a working thread without using Invoke or BeginInvoke...
MigrationUser 1  Wednesday, November 26, 2003 8:42 PM

You can use google to search for other answers

Custom Search

More Threads

• Printing question
• Maximizing child forms
• Setting the Value of Items in a ComboBox
• Multithreading with Grids(Real time apps)
• Switching forms (Closing a form and going to the next)
• Application.ExecutablePath gives strange info
• How can I create a global function to start up an MDI Child?
• pictureBox and image
• Newbie C# user
• How to prevent 2nd Instance of EXE