Automatic redrawing of background - C#

Started by
1 comment, last by AlsoPenCover 15 years, 9 months ago
Is there a way to make it so that my Form doesn't automatically redraw the background? I just started game programming in C#, and it's annoying to see the black background appear whenever the screen is automatically refreshed, usually by dragging another window on then off of it.
Advertisement
You can overload the OnPaintBackground method of your form and not call the base method. Alternatively, you can call this to have all painting of your form done in the OnPaint method:

Setstyle(Controlstyles.AllPaintingInWmPaint | Controlstyles.UserDraw, true);
Mike Popoloski | Journal | SlimDX
Hah, once again, thank you. I got it now.

This topic is closed to new replies.

Advertisement