Find the error(s) in the following code. This is the definition for a Click even
ID: 638328 • Letter: F
Question
Find the error(s) in the following code. This is the definition for a Click event handler for a Button. This event handler should draw a rectangle on a PictureBox control.
1 Private Sub drawImageButton_Click(sender As System.Object,
2 e As System.EventArgs) Handles drawImageButton.Click
3
4 ' create an orange colored brush
5 Dim brush As New SolidBrush(Orange)
6
7' create a Graphics object to draw on the PictureBox
8 Dim graphicsObject As Graphics = mainPicture.AcquireGraphics()
9
10 ' draw a filled rectangle
11 graphicsObject.FillRectangle(brush, 2, 3, 40, 30)
12 End Sub ' drawImageButton_Click
Explanation / Answer
i tried to find our errors but i am unable to find.but here is the working code which is to fill box
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.