Stop a form from displaying until all labels and graphics loaded

  • Thread starter Thread starter will_456
  • Start date Start date
W

will_456

I have a form containing many controls which receive their properties at
design time. Trouble is the form displays large transparent squares all
over it while pictures and labels are being filled. It also flashes several
times which is quite annoying to watch.
Is there a way to keep the form hidden until everything is ready for
display?
 
Make you instantiate the form and then show the form as 2 distinct steps,
i.e:

Dim _f As New MyForm

_f.Show()

This means that all the properties will be set in the first step and the 2md
step only needs to show the form.

Eeven so there may still be some noticable overhead as the form is actually
rendered (drwan on the monitor) depending on how much system resource is
available at the time.
 
What exactly does your form do?

If it just has labels and picture boxes, you could just create a bitmap
on the fly that looks like the form, and then use GDI+ to paint the
bitmap onto the form. This is a pretty drastic option depending on what
the form does however, so hopefully Stephany's solution solves your
problem.

Thanks,

Seth Rowe
 
Thanks I have followed this method but it still seems to draw on the screen
in stages eg. Background with white squares all over it where controls
should be then buttons, labels etc. appear. As you say it's probably my slow
display.
thanks again
 
Back
Top