all groups > dotnet windows forms > august 2005 >
You're in the

dotnet windows forms

group:

Loading a form 'cleanly'


Re: Loading a form 'cleanly' Tim Mackey
8/31/2005 12:00:00 AM
dotnet windows forms:
hi Buzz,
so it sounds like the problem isn't in your initialisation code, if it
happens when you switch tabs as well.
do any of the controls you are using do any custom painting? there could be
some slow code in there. i've used some 'rich' controls before, like office
XP style menus, and they were poorly designed, causing flicker and slow
screen loading.

certainly a simple form without any 'extra' code in the load or initialise
sections should not display any clunkiness such as you have described.
unless you're machine has 8mb of shared video memory or something like that?

i know it's a pain, but you might try making a duplicate of your
application, and pulling out any custom load and init code bit by bit until
this behaviour goes away, allowing you to isolate the problem. if it is
still evident, you could then try removing the controls one by one. i
presume it doesn't happen on a blank form with no controls or custom code.

let us know how you get on
tim


[quoted text, click to view]

Loading a form 'cleanly' Buzz
8/31/2005 1:52:04 AM
I was not quite able to find good search terms so sorry if this is redundant.

What I am trying to do is have my form load cleanly. I have many controls
and I literally watch the form draw before my eyes. This happens on several
test machines with ngenned code. We use VB.NET.

I load the values from the dataset during the Form Load. However, I loaded
the dataset from the dataset on the New before calling ShowDialog. However,
even in an addnew situation where I don't load from the database, it still
loads poorly. I put some timings in and InitializeControls takes less than a
second.

First the text of the combo boxes appear, then the controls and then the
background in about three rectangle chunks. This sequence happens everytime.
There are many controls here but I've even seen this chunkiness on simple
forms. Plus, everytime I switch to a new tab on the tab control, the same
chunkiness is there. It really makes my app look clunky and unprofessional.

Thanks for the help,
RE: Loading a form 'cleanly' v-jetan NO[at]SPAM online.microsoft.com (
9/8/2005 7:44:26 AM
Hi Buzz,

Does Tim's reply make sense to you? Is your problem resolved? If you still
need help, please feel free to feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
AddThis Social Bookmark Button