design question about new thread forms...

alanchinese

Regular
Joined
Jan 12, 2005
Messages
62
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.
 
Possibility

alanchinese said:
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. :)
 
Back
Top