Flicker when loading forms using background bitmap

  • Thread starter Thread starter Per Dunberg
  • Start date Start date
P

Per Dunberg

Hi all,

I have to develop a "skinned" application and I have a problem with the
graphics.
When a form is loaded and displayed there's aways a flicker where all the
controls are located on the form. It seems like the controls erase the
background and this cause a flicker everytime a form i loaded.
When I hide and show forms that are already loaded there's no flicker, it's
just when the form is loaded the first time.

I'm using DoubleBuffering for the form and the controls but this doesn't
make any difference.
If any one knows how this flicker can be reduced or removed please let me
know.

Thanks for your help.

Per
 
Thanks Jorge.
Unfortunally there is no help to this problem in that thread.
In fact the sample posted ("Drawing without flicker") in that thread has the
same problem.
The drawing of the image that you can move around is ok but when the form
loads there's flicker just before loading the panel on the form.

Create a new project and set an image as background, and add a couple of
controls to the form.
Then load the form and have a window in the background (or the desktop) with
a solid color.
Then you will see that when the form is displayed the background for the all
the controls on the form flickers and displays the solid color just before
the control shows.
In fact you do not even need to set an image as background on the form, but
it just makes the flicker more visible.
If anyone knows how this can be solved or have any other ideasd that would
be very appreciated.

Is there anyway to not have controls erase the background before they are
drawned?

Thanks.


"Jorge Serrano [MVP VB]"
 
Hi Jorge,

Thanks for you answer.

The information on the provided website didn't help.
Actually, I downloaded "Drawing without flicker" and it the problem can also
be seen with that sample.
The redrawing works just fine but the first time the form is loaded the
controls erase the background which causes a flicker. Once the form is
completely loaded then there is no problems with the drawing.

Is there anyway to prevent controls from erasing the background before they
are painted.
Another tricks to have forms load faster?

Kind Regards,

Per Dunberg


"Jorge Serrano [MVP VB]"
 
Back
Top