• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How do you clear a Panel in a Windows Application?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

TFawks

Registered
Joined
Sep 15, 2008
Location
Live in CT, College in NH.
The title says it all, that is literally all I have to do to finish this program.

I'm runnung C# 2008, and every time I use "Graphic.Clear(panel1.BackColor)", it gives me an error whenever I click a button that uses it.
What is the syntax?

~Fawks
 
In generic terms without knowing anything more of the code:

panel1.CreateGraphics().Clear(panel1.BackColor);
 
Back