Control flicker

  • Thread starter Thread starter Peter Morris
  • Start date Start date
P

Peter Morris

Hi all

I had marked a thread in here that I can no longer find so I will have to
re-ask a question I'm afraid.

I have a wizard based form. When you move to another step it removes the
current step's control and adds the control for the next step. This causes
lots of flickering in the GUI as the control is removed, and then the new
one is first added and then resizes to fit the client area.

What can I do to make this smoother?


Thanks
 
Hi Pete,

You could try this a couple of ways.

The first is the easiest to impliment: Try setting DoubleBuffered to True on
your form's Properties from the Design View. Sometimes that helps.

Second idea: Use a tab control and hide the tabs (I think this is what most
installers use as they go from step to step). That way, all of your controls
are already loaded and you are just showing or hiding them.

If this isn't what you're asking, please give a few more details.

Regards,
Joe Pool
 
The first is the easiest to impliment: Try setting DoubleBuffered to True
on
your form's Properties from the Design View. Sometimes that helps.

Unfortunately that makes no difference.
Second idea: Use a tab control and hide the tabs (I think this is what
most
installers use as they go from step to step). That way, all of your
controls
are already loaded and you are just showing or hiding them.

The controls are created dynamically based on the view that is required to
be displayed, so it's not possible to do it this way.


Regards
 
Ok, how about this:

Create a new panel (or have a panel on your desktop with visibility =
false), do all of your drawing, then set Visible=true.

?
 
I'm not doing any drawing. I am removing a complex control from my form and
then adding a new complex control, and when I do it flickers a lot.
 
Use SuspendLayout before you start adding/removing controls and
ResumeLayout when you are done.
 
Back
Top