PDA

Click to See Complete Forum and Search --> : Avoiding Flickering effect


mid
Jul 17th, 2000, 08:57 AM
Hello everybody,

I am developping an VB application including a picturebox.
The purpose of this picturebox is to create an animated instrument which reacts according to an array of data.
So I use the polygon API function to draw this instrument.

The problem is that I update the displayed graphic 4 times per seconde which creates a very inconfortable flickering(or flashing?) effect.

I do not use any "refresh" function since the picturebox is fully repainted.

Does anyone have any tip to avoid such flickering effect?

Thank you a lot for your help.

MID

Fox
Jul 17th, 2000, 11:53 AM
You need a buffer.

First you draw everything into your buffer picture (which is invisible), then you draw the whole buffer to the screen. That prevents flickering, but costs a bit of performance (But it's worth it ;)).

VB Knowadge
Jul 17th, 2000, 11:06 PM
I want to do the same thing but with a label. The label has prewritten text in it. It label will be moving around the screen.