I've got a panel in windows forms (Visual Studio 2008) which has a background image (A book shelf). When scrolling the image flickers and does not redraw so looks awfully - I've tried creating a new object to use double buffering but this has no effect, any suggestions?
Public Class DoubleBufferPanel
Inherits Panel
Public Sub New()
Me.DoubleBuffered = True
SetStyle(ControlStyles.AllPaintingInWmPaint Or _
ControlStyles.DoubleBuffer Or ControlStyles.ResizeRedraw Or ControlStyles.UserPaint, True)
UpdateStyles()
End Sub
End Class