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

Using Visual Basic to make graphics on forms. Show forms and coding please. I wo

ID: 3688609 • Letter: U

Question

Using Visual Basic to make graphics on forms. Show forms and coding please. I would appreciate this. Keep it nice and simple for each of the following.

.13.2 - Draw Lines Create GraphicsOne . 13.3 - Draw a Rectangle - Create GraphicsTwo . 13.5 - Draw a Circle - Create GraphicsFour .13.6 - Draw a Polygon - Create GraphicsFive . 13.7 - Draw a Triangle - Create GraphicsSix .13.8 - Draw a Pie Graphic - Create GraphicsSeven . 13.9 - Draw in a PictureBox Control - Create GraphicsEight Need a PictureBox control on the screen. (name) picGraphics .13.10 - Draw in a TextBox Control - Create GraphicsNine Need a textBox control on the screen. (name) txtLine .13.11 - Fill in a Graphic - Create GraphicsTen .13.12 - Draw a String - Create Graphics . 13.13 - Draw with the Mouse Create GraphicsTwelve

Explanation / Answer

Question 13.2 Code for drawing lines between two points

Public Sub lineDrawWithPoints(ByVal e As PaintEventArgs)

    Dim penType As New Pen(Color.Black, 5)

    Dim firstPoint As New Point(50, 50)
    Dim secondPoint As New Point(250, 50)

    e.Graphics.DrawLine(penType, firstPoint, secondPoint)
  
End Sub

Question 13.3 Code for drawing rectangle

Public Sub rectangleDraw(ByVal e As PaintEventArgs)

    Dim penType As New Pen(Color.Black, 5)

    Dim a1 As Integer = 0
    Dim a2 As Integer = 0
    Dim recWidth As Integer = 100
    Dim recHeight As Integer = 100

    e.Graphics.DrawRectangle(penType, a1, a2, recWidth, recHeight)
  
End Sub

Question 13.4 Code for drawing Circle

Public Sub circleDraw(ByVal e As PaintEventArgs)

    Dim penType As New Pen(Color.Black, 5)

    e.Graphics.DrawEllipse(penType, 0, 0, 150, 150)
  
End Sub

Question 13.5 Code for drawing Polygon

Public Sub polygonDrawWithPoints(ByVal e As PaintEventArgs)

   Dim penType As New Pen(Color.Black, 5)


    Dim firstPoint As New Point(50, 50)
    Dim secondPoint As New Point(100, 25)
    Dim thirdPoint As New Point(200, 5)
    Dim forthPoint As New Point(250, 50)
    Dim fifthPoint As New Point(300, 100)
    Dim sixthPoint As New Point(350, 200)
    Dim seventhPoint As New Point(250, 250)
    Dim joinPoints As Point() = {firstPoint, secondPoint, thirdPoint, forthPoint, fifthPoint, sixthPoint, seventhPoint}

    e.Graphics.DrawPolygon(penType, joinPoints)
End Sub

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote