Automatic redrawing of background - C#
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.
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);
Setstyle(Controlstyles.AllPaintingInWmPaint | Controlstyles.UserDraw, true);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement