Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i made c# windows application
when i click start
the program keep not responding for long time
then show results
i want it dont show not responding
and add good visual progress bar
thx
Posted
Comments
Sandeep Mewara 26-Jun-10 8:16am    
In case alert of my comment is not fired, I posted the links in my comments.

Seems like your program is performing some task during the startup routine.

To maintain responsiveness of your UI while still performing a process-intensive task you should launch your tassk in another thread.

See the BackgroundWorker class for an easy starting point.
 
Share this answer
 
Comments
promarkoo 26-Jun-10 8:08am    
i dont mean in starting up program
xD
i mean when i click start processing
// it contain much processing (matlap too)
Richard Hauer (5 Limes) 26-Jun-10 8:16am    
same deal - create a dialog with a progressbar. In the dialog's OnLoad call BackgroundWorker to do your work in another thread and set the BackgroundWorker.RunWorkerCompleted event to a method that will close the dialog. You can use BackgroundWorker.ProgressChanged event to report on the progress of the task.

To start running the task simply open the dialog.
You need a Progress Bar or a Please wait splash screen thing!

There are few articles on the same here in CodeProject itself. Have a look:
Progress-O-Doom
A Pretty Good Splash Screen in C#

More results on CP Search.
 
Share this answer
 
Comments
promarkoo 26-Jun-10 8:08am    
i dont mean in starting up program
xD
i mean when i click start processing
// it contain much processing (matlap too)
promarkoo 26-Jun-10 8:11am    
btw ur links is not found page :( x.x
Sandeep Mewara 26-Jun-10 8:15am    
Strange! looks like the new changes have some bugs: Posting the links here:
http://www.codeproject.com/KB/progress/ProgressODoom.aspx
http://www.codeproject.com/KB/cs/prettygoodsplashscreen.aspx
http://www.codeproject.com/info/search.aspx?artkw=progress+c%23

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