Graphics and Double Buffering

  • Thread starter Thread starter Simon Jefferies
  • Start date Start date
S

Simon Jefferies

Hello,

I am using the Paint event to draw graphics, but I am getting annoying flickering. Is there anyway to perform double-buffering?

I have looked at creating a bitmap, but is limited in what I can do with it.

Any ideas?

Thanks
Simon Jefferies
(e-mail address removed)
 
Simon,
Include the following in your Form or Control's constructor.

' Stop the flicker
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.UpdateStyles()

This needs to be in the class you are painting ON, which can be different
then the object where the paint handler is. I normally handle the Paint
event in the same class that I am painting on.

Hope this helps
Jay

Hello,

I am using the Paint event to draw graphics, but I am getting annoying
flickering. Is there anyway to perform double-buffering?

I have looked at creating a bitmap, but is limited in what I can do with it.

Any ideas?

Thanks
Simon Jefferies
(e-mail address removed)
 
Simon Jefferies said:
I am using the Paint event to draw graphics, but I am getting
annoying flickering. Is there anyway to perform double-buffering?

I have looked at creating a bitmap, but is limited in what I can do
with it.

Any ideas?

Maybe somebody at
microsoft.public.dotnet.framework.drawing
can help you.
 
Back
Top