Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to display progress bar in long process in c# windows application, can anyone help
Posted
Comments
Karthik_Mahalingam 6-Jan-14 8:22am    
if your process happens inside a loop, you can use progress bar, else you can use some loading GIF image..

1 solution

You can update your progress bar with threading.


.NET Includes a class called the BackgroundWorker, which provides methods for reporting the progress of the background thread in an event. The event is automatically called on the thread which created the BackgroundWorker (typically, the UI thread).

Subscribe to that "ProgressChanged" event, and update the progress bar in that event handler. The official MSDN Documentation provides some sample code.


Source:
Updating a progress bar in a C# Gui from another thread and class[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900