Screen/Form Painting When Loading

G

Guest

I am developing a winforms project in vb.net. I have several forms that have
a number of controls, grids, etc. When I load these as MDI child forms, they
load slowly AND they paint/repaint on the screen, and it makes a sloppy
presentation. I am unhappy with it, and obviously the client says that it is
unacceptable.

How can I make a nice, crisp form/screen opening?

Thanks so much for you help.
 
J

John Mark Howell

Do they load slowly everytime that you load them or just the app is started?

If it is just when the app is started, then one solution is to create a
splash screen that is displayed with a progress bar that you update as you
create your forms (in the background as non-visible), then when the forms
are loaded, you can then display the MDI parent & children and hide the
splash screen.

If it is everytime you try to load and display one of your MDI child forms,
you need to look to see what is taking the time: Is it loading the data
into a DataSet? Binding to the DataGrid? Do you have custom DataColumns
doing background lookups? It could be any number of things.

Unless you are doing a fair bit of GDI/GDI+ custom control painting, then
there is really no reason that the forms should take long to load. Do you
have a large number (such as 100) controls on the child forms? If that is
the case, then you might want to add a forms manager class that statically
holds the MDI child form instances and simply hands them to you as you need
them.

HTH.
 

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

Top