Hi all,

In my form load, I load a datagrid with a fair amount of data. So when I
click on the button that creates the form I show the wait cursor but it
looks like the program has hung the button stays in and it looks like it
isn't doing anything until it has loaded all the datagrid etc...

Is there a way in which when the toolbar button is pressed I refresh the
button, show the form first then I can put "loading data" in the status bar
(or even a progress bar in the status bar also) then finally load the
datagrid? I think in C++ this was called ProcessMessages but I cannot see
this in c#.

Thanks for the help
Regards
Gav

Re: form load by Andrew

Andrew
Tue Mar 15 15:20:21 CST 2005

Gav,

I am just a beginner myself, so don't know how to do exactly what you want.
However, a more professional way to handle this situation is to create a
splash screen.

I had the same issue with my app and I came across a good example the other
day:
www.codeproject.com/csharp/PrettyGoodSplashScreen.asp

Hope that helps

Maree

"Gav" <spam@spam.com> wrote in message
news:O1TJ93TKFHA.4092@tk2msftngp13.phx.gbl...
> Hi all,
>
> In my form load, I load a datagrid with a fair amount of data. So when I
> click on the button that creates the form I show the wait cursor but it
> looks like the program has hung the button stays in and it looks like it
> isn't doing anything until it has loaded all the datagrid etc...
>
> Is there a way in which when the toolbar button is pressed I refresh the
> button, show the form first then I can put "loading data" in the status
> bar (or even a progress bar in the status bar also) then finally load the
> datagrid? I think in C++ this was called ProcessMessages but I cannot see
> this in c#.
>
> Thanks for the help
> Regards
> Gav
>
>



Re: form load by Gav

Gav
Tue Mar 15 17:26:39 CST 2005

Thanks for trying to help... it's not quite what i was looking for.

It is a mdi application and the data is loading in a child form, that
wouldn't be the right time to show a splash screen.

Regards
Gav

"Andrew and Maree Cassidy" <amcassidy@NOSPAMnetspace.net.au> wrote in
message news:uGvZRTaKFHA.1308@TK2MSFTNGP15.phx.gbl...
> Gav,
>
> I am just a beginner myself, so don't know how to do exactly what you
> want. However, a more professional way to handle this situation is to
> create a splash screen.
>
> I had the same issue with my app and I came across a good example the
> other day:
> www.codeproject.com/csharp/PrettyGoodSplashScreen.asp
>
> Hope that helps
>
> Maree
>
> "Gav" <spam@spam.com> wrote in message
> news:O1TJ93TKFHA.4092@tk2msftngp13.phx.gbl...
>> Hi all,
>>
>> In my form load, I load a datagrid with a fair amount of data. So when I
>> click on the button that creates the form I show the wait cursor but it
>> looks like the program has hung the button stays in and it looks like it
>> isn't doing anything until it has loaded all the datagrid etc...
>>
>> Is there a way in which when the toolbar button is pressed I refresh the
>> button, show the form first then I can put "loading data" in the status
>> bar (or even a progress bar in the status bar also) then finally load the
>> datagrid? I think in C++ this was called ProcessMessages but I cannot see
>> this in c#.
>>
>> Thanks for the help
>> Regards
>> Gav
>>
>>
>
>



Re: form load by Ronin

Ronin
Tue Mar 15 18:25:17 CST 2005

Gav have you thought of placing the data into a DataSet and then sending
the request via the Select statement back to the page?

--
Message posted via http://www.dotnetmonster.com

Re: form load by Gav

Gav
Wed Mar 16 03:11:07 CST 2005

I do put the data into a dataset... I don't have a problem with retrieving
the data or showing it the problem I have is with the form waiting for the
load to finish before continuing to draw itself.

I think I either need to put the loading code in it's own thread or if there
is some sort of FormLoaded event i could put it in there... I just would
have thought somebody else would have dealt with this situation before.

Anybody?

Thanks
Gav

"Ronin via DotNetMonster.com" <forum@DotNetMonster.com> wrote in message
news:c23c0f82678441129094c63c97beb178@DotNetMonster.com...
> Gav have you thought of placing the data into a DataSet and then sending
> the request via the Select statement back to the page?
>
> --
> Message posted via http://www.dotnetmonster.com