Sign in to follow this  
AlsoPenCover

Automatic redrawing of background - C#

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this