i have used progress bar in my application..my application is working fine but the progress bar is blank..it does not show the working progress what is wrong??
+9
A:
Probably you are performing the work in the main GUI thread. This causes all GUI events to be delayed until the task is finished.
Use a BackgroundWorker instead and use its ProgressChanged event to update the progress bar.
Also remember to set WorkerReportsProgress to true
on your background worker.
Mark Byers
2010-03-25 06:53:51
i have used BackgroundWorker for the progress bar..to show results according to the application running but it is not showing anything its just blank.....
shruti
2010-03-25 07:03:16
@shruti: Can you simplify your code to the simplest possible example that still demonstrates the error you are experiencing and then post your code here so we can see it?
Mark Byers
2010-03-25 07:05:40
@shruti: See my update regarding WorkerReportsProgress. Maybe that solves your problem.
Mark Byers
2010-03-25 07:09:24
yes i did that already..i cant display the code bcoz im doing multiple things and to display all will be very confusing.. im just using the logic that if the work is in progress int percent = (int)((100 * writtenSectors) / burnData.sectorCount);lblStatus.Text = string.Format("Progress: {0}%", percent); statusProgressBar.Value = percent;else{lblStatus.Text = "Progress 0%"; statusProgressBar.Value = 0; }
shruti
2010-03-25 07:26:28
A:
Rakesh Gunijan
2010-03-25 08:25:40