Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The whole concept of this project is whenever I enter the name of the shape, its

ID: 3702152 • Letter: T

Question

The whole concept of this project is whenever I enter the name of the shape, its sides and its figure must appear.
the problem is I want a code to remove the previous figure when I write the another name to make next figure appears clearly without overlapping with the last one

also I need to know where I could write it

Tools Test Analyze Window Help Any CPU orml.vb t ? tion 15 Form2.vb [Design) Form1.vb [Design] btnCheck Click myGraphics Graphics.Fromtwnd(picoutput.Handle) If txtinput-Text = "Circle" Then lblsides.Text "No Sides" myGraphics.Fillellipse (Brushes. Aqua, 10, 10, 100, 10e) ElseIf txtInput.Text "Triangle" Then lbisides . Text "Three sides'. myGraphics.FillPath(Brushes.Aqua, gp) myGraphics.DrawLines (Pens.Aqua, triangle) ElseIf txtInput.Text "Square" Then lblsides. Text "Four Sides" myRectangle New Rectangle(x:-10, y: -10, width:-100, height:-100) myGraphics. FillRectangle(Brushes.Aqua, rect:-myRectangle) Elself txtInput. Text -Pentagon Then 1blSides. Text -"Five Sides" myGraphics.FillPolygon (Brushes. Aqua, pentagon) Else MsgBox("You must enter the valid shape!") End If 0 Messanes

Explanation / Answer

Hello,

You need to write the below code at the end of If ElseIf statement.

e.Graphics.Clear(Color.White)

Thanks.