ProgressBar or WaitCursor

P

PK

I have a MDI Application. It has a simple menu. On clicking menu
items, child forms open. Since, the loading of the form was taking
quite sometime, I have separated the loading of data by using a
background thread. Now, first the UI elements are loaded, the form is
displayed and then the data is loaded. But, still the form (UI
elements) take sometime to load and on the click of a menu item, the
menu remains for sometime in a frozen state and then the form gets
loaded. I know that this will happen and I want to just enhance user
experience by showing some waitcursor or progressbar.
On the Main form, I use the following code:
this.UseWaitCursor = true; OR toolStripProgress.Style = Marquee;
ChildForm c = new ChildForm();
c.MdiParent = this;
c.Show();

and after the form is Shown in the eventhandler C_Show()
this.UseWaitCursor = true; OR this,MDIParent.toolStripProgress.Style
=
Continuos;

I know this is a CATCH-22 situation.(had posted this on
microsoft.public.dotnet.languages.csharp
and came to know about it)
But then I am confused, as I have seen some applications doing
this...
For Example in VS2005,
Click File>New>Project....and first a hour glass appears and then
appears the form/window titled "New Project". How do they do it?

and does it make sense to load a new form on a new thread (by
creating
a message loop) for solving this problem?

Thanks.
 
B

Bob Powell [MVP]

From a design point of view you should use a progress bar to reassure
the user that something is happening and the wait cursor to signify that
no action is available. If other actions are available while the load is
taking place, don't use the wait cursor, otherwise use both.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top