Making my winform appear smoothly

  • Thread starter Thread starter hello_world
  • Start date Start date
H

hello_world

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

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

Back
Top