Clear Graphics

  • Thread starter Thread starter Guest
  • Start date Start date
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.?????
 
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.
 
Back
Top