protected override void OnPaintBackground(PaintEventArgs pevent)
{
// do nothing
}
This blog is a depository for things I have found regarding VB.NET and C#.NET development (and other things I may need to remember). This blog is primarily for my own reference, but if the information I found is useful to others, then that is great. If others want to contribute with comments or other information, then that is great too.
Showing posts with label Flicker. Show all posts
Showing posts with label Flicker. Show all posts
Tuesday, July 12, 2011
Preventing Flicker with GDI+ drawing in C#
In C#, the OnPaintBackground method is called before the OnPaint event and it draws the background color for the entire view. If you are already drawing the background in the OnPaint event, then this process will cause flicker. You can override the OnPaintBackground and just do nothing in it to prevent the flicker:
Subscribe to:
Posts (Atom)