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.
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.