I have a winform containing a TabControl with multiple TabPages. Each
TabPage in turn contains several controls (Labels, TextBoxes ...).

Now, when I load my form or switch TabPages, the controls within the
form do not appear in a smooth manner, i.e, I see the outlines of the
controls first for a fraction of a second and then the form is drawn
completely. Is there a way to correct this - to make my form and its
controls appear simultaneously?


Thanks.

Re: Making my winform appear smoothly by Cerebrus

Cerebrus
Tue Feb 28 04:23:27 CST 2006

I usually see such behaviour when I run the program in Debug mode(F5),
but when I choose Start without Debugging (Ctrl+F5), it doesn't happen
anymore. So, after you're finished with your debugging, you might
enable optimizations and run without debugging. See if there's any
improvement in performance.

Regards,

Cerebrus.


Re: Making my winform appear smoothly by Stoitcho

Stoitcho
Tue Feb 28 08:29:27 CST 2006

Hi,

It could be due to heavy intialization.
I'd suggest reading the following article regarding improving applications
start-up time:
http://msdn.microsoft.com/msdnmag/issues/06/03/WindowsFormsPerformance/

Keep in mind that windows draw borders in response to WM_NCPAINT, which is
high priority message where WM_PAINT for drawing the content of the windows
is very low priority and is not going to be processed if the message queue
or application is busy.


--
HTH
Stoitcho Goutsev (100)

"hello_world" <ashvindomah@gmail.com> wrote in message
news:1141102110.439767.231140@p10g2000cwp.googlegroups.com...
>I have a winform containing a TabControl with multiple TabPages. Each
> TabPage in turn contains several controls (Labels, TextBoxes ...).
>
> Now, when I load my form or switch TabPages, the controls within the
> form do not appear in a smooth manner, i.e, I see the outlines of the
> controls first for a fraction of a second and then the form is drawn
> completely. Is there a way to correct this - to make my form and its
> controls appear simultaneously?
>
>
> Thanks.
>