The most likely cause of the flicker is the OnPaintBackground event which fires before the OnPaint event. Using C# this can easily be solved by doing the following section of code. It is worth noting however that if you do override this method you must draw the entirity of the control (using either Graphics.Clear(), or another method such as DrawRectangle()) in the Paint method otherwise some sections will not get drawn
With regards to the Invalidate() method all this really does is tells a control to redraw to the screen. When used in conjunction with a bitmap buffer this can reduce the amount of calculations that are performed by the Paint event.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.