Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***THIS IS THE QUESTION*** ***THE CODES I HAVE RIGHT NOW ARE LISTED BELOW. THE BOLDED WORDS ARE THE ERRORS I NEED CORRECTED. I ALSO NEED

***THIS IS THE QUESTION***

image text in transcribed

***THE CODES I HAVE RIGHT NOW ARE LISTED BELOW. THE BOLDED WORDS ARE THE ERRORS I NEED CORRECTED. I ALSO NEED CODES FOR THE LABELS***

Public Class Form1 Private ReadOnly nameLabel As Object Private phoneLabel As Object

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click

End Sub

Private Sub PropertyGrid1_Click(sender As Object, e As EventArgs)

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click End Sub Public Class MainForm Private Sub electricianButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles electricianButton.Click nameLabel.Text = "Tom" 'To display electrican name in label phoneLabel.text = "(856)889-0876" 'To display electrician phoneno in label End Sub

End Class

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click End Sub Private Sub plumberButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles plumberButton.Click nameLabel.Text = "Scott" 'To display plumber name in label phoneLabel.Text = "(856)430-2892" 'To display plumber phoneno in label End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click End Sub Private Sub doctorButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles doctorButton.Click nameLabel.Text = "Samantha" 'To display doctor name in label phoneLabel.Text = "(856)472-0621" 'To display doctor phoneno in labelEnd Class End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click End Sub Private Sub hospitalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles hospitalButton.Click nameLabel.Text = "Lisa" 'To display hospital name in label phoneLabel.Text = "(856)889-0877" 'To display doctor phoneno in labelEnd Class End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click End Sub Private Sub professorButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles professorButton.Click nameLabel.Text = "Barbara Turner" 'To display professor name In label phoneLabel.Text = "(856)415-2297" 'To display professor phoneno in labelEnd Class End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click End Sub Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click Handles exitbutton.Click Me.Close() 'To exit window End Sub End Class

****Everything that is bolded is coming up as an error**** How do you fix those errors?

00 Add to my library Write review Page 71 t 1 of 1 in this book for create an center the names and phone ers (1-9,11) numbers within their respective label controls. you provide the names and phor Important Information Create an application that displays a name and phone number. Use the following names for the solution and project, respectively: Info Solution and Info Project. Save the application in the VbReloaded20151Chap0l folder. Change the form files name to Main Form.vb. You can either create your own interface or create the one shown in Figure 1-72. Be sure to assign meaningful names to the form, the buttons, and the label controls that display the name and phone number Center the names and phone numbers within their respective label controls. You provide the names and phone numbers. (1-9. 11) Important Information Eleco lcian Name: Plumber Phone: Doctor Hospital Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions