My form startup implements some logic that takes a little while, but my form
isn't showing fully until it has all finished. I write progress messages to
a label and also update a progressbar, and even with Refresh() calls only a
"skeleton" of the form is displayed until all logic is complete.

How can I do this properly ?

Re: Refresh on form startup by Adrian

Adrian
Mon Mar 14 04:19:24 CST 2005

Hi!
Try to use Application.DoEvents();

Hope that helps.
Best regards.



Re: Refresh on form startup by JezB

JezB
Mon Mar 14 04:51:08 CST 2005

Hmm no it didn't really help. My code is called from the form's constructor,
after the call to InitializeComponent. Is this the correct place ?

"Adrian" <matadi49@yahoo.com> wrote in message
news:eKa3v7HKFHA.3064@TK2MSFTNGP12.phx.gbl...
> Hi!
> Try to use Application.DoEvents();
>
> Hope that helps.
> Best regards.
>
>



Re: Refresh on form startup by JezB

JezB
Mon Mar 14 04:54:37 CST 2005

Oh hang on though, the combination of both :

this.Show();
Application.DoEvents();

from the form's constructor DOES work. Thanks for the input.

"Adrian" <matadi49@yahoo.com> wrote in message
news:eKa3v7HKFHA.3064@TK2MSFTNGP12.phx.gbl...
> Hi!
> Try to use Application.DoEvents();
>
> Hope that helps.
> Best regards.
>
>



Re: Refresh on form startup by Herfried

Herfried
Mon Mar 14 11:03:52 CST 2005

"JezB" <jezbroadsword@blueyonder.co.uk> schrieb:
> Oh hang on though, the combination of both :
>
> this.Show();
> Application.DoEvents();
>
> from the form's constructor DOES work. Thanks for the input.

Typically forms are not shown when they are initialized. They are shown by
either calling their 'Show' or 'ShowDialog' methods from outside the form.
The "skeleton drawing" problem seems to occur on some systems only.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Re: Refresh on form startup by JezB

JezB
Tue Mar 15 03:44:18 CST 2005

Useful to know - thanks.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%23WzuLfLKFHA.1476@TK2MSFTNGP09.phx.gbl...
> "JezB" <jezbroadsword@blueyonder.co.uk> schrieb:
>> Oh hang on though, the combination of both :
>>
>> this.Show();
>> Application.DoEvents();
>>
>> from the form's constructor DOES work. Thanks for the input.
>
> Typically forms are not shown when they are initialized. They are shown
> by either calling their 'Show' or 'ShowDialog' methods from outside the
> form. The "skeleton drawing" problem seems to occur on some systems only.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>