Click here to Skip to main content
15,746,883 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am creating a window application in c#. It is almost complete now. But I want one more feature in this application which I do not know how to achieve. I want a "PLEASE WAIT" message in my application while any of processing is on process. when it finish the message will be hide.

I don't know how to do this please experts please help me to sort out this problem
Updated 21-Aug-14 21:17pm

Why not changing the cursor to wait at process start and restore it at end of process?
If your processes are in task, you can use the event Progresschanged to handle your message box.
Best regards.
Share this answer
The simplest way for doing this is by using a Timer object and use a short time interval (like 100 ms) to check a wait flag that will be set on true when the process start and on false when the process will be finished. The wait form will be activated when the process start and the timer method will check when to close it based on the wait flag.
Share this answer
AZAD CHOUHAN 22-Aug-14 3:42am    
but what if my process go more then 100 ms ?? I have no any idea how much it time will take?
Raul Iloc 22-Aug-14 3:46am    
The 100ms time interval is minimum about of time used to show the wait form. Is the time used by the timer to invoke its method for checking if the process was finished or not. So is no problem to use 100 ms for your timer!

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