Clear Graphics

G

Guest

I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I’m not to sure how.

Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()

cmdClear_Click
Me.Panel.?????
 
G

Guest

Gus said:
I got a simple line of code that paints on a panel. I would like to add a
clear button to clear the panel but I’m not to sure how.

Panel.MouseMove
Dim g As Graphics = Me.Panel1.CreateGraphics()
g.FillEllipse(New SolidBrush(Value), e.X, e.Y, SizePt, SizePt)
g.Dispose()

cmdClear_Click
Me.Panel.?????

Use the Clear(Color) method in the Graphics class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top