alanchinese Posted January 27, 2005 Posted January 27, 2005 i have forms needs some time to load the data. i want to pop up a form saying "Form is Loading... please wait" so that the users won't get confused and try to initiate multipul forms before the first one finished loading. also, i want to include a button "Cancel" so that by clicking it the users can terminate the form. i am able to implement this feature by creating a new thread to display the "waiting" messagebox and creating delegates for the "waiting" form to invoke the "CloseForm" function in the main form. i just wonder if there is a better and safer way to accomplish this? thankx. Quote
Richard Crist Posted January 28, 2005 Posted January 28, 2005 Possibility i have forms needs some time to load the data. i want to pop up a form saying "Form is Loading... please wait" so that the users won't get confused and try to initiate multipul forms before the first one finished loading. also, i want to include a button "Cancel" so that by clicking it the users can terminate the form. i am able to implement this feature by creating a new thread to display the "waiting" messagebox and creating delegates for the "waiting" form to invoke the "CloseForm" function in the main form. i just wonder if there is a better and safer way to accomplish this? thankx. Perhaps instead of creating a new thread with a messagebox, you could just take care of everything on the main form. You could add a status textbox to the main form to display progress notes, and you could disable controls on the main form until you are ready for users to do other stuff. This would negate the need for a separate thread during load time at the beginning. But I may be simplifying your problem. :) Quote nothing unreal exists .NET Framework Homepage ~ Visual C# Spec ~ C++/CLI Spec ~ Visual Basic .NET Spec
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.