Question

In: Computer Science

Visual Basic Your first job is to create a visual basic project that will display the...

Visual Basic

Your first job is to create a visual basic project that will display the name and telephone number for the contact person for the customer relations, marketing, order processing, and shipping departments. Include a button for each department. When the user clicks on the button for a department the program(in code for specific button will display the name and telephone number for the contact person in two labels. The same two labels will be used for each department Also include identifying labels with text "Department Contact'' and "Telephone Number". Be sure to include a button for Exit. Include a label at the bottom of the form that holds your name. Department Department Telephone Contact Custom relations Tricia Mills 500-1111• Marketing Michelle Rigner 500-2222 Order Processing Kenna DeVoes 500-3333 Shipping Eric Martin 500-4444

Solutions

Expert Solution

Answer)

I take one form in Visual Basic after opening the project. Then I take four buttons for four departments, and one button for exit. I Change the text of every button to display according to their departments and exit for exit button. I marked in the code which buuton is used for which deparment. The I take five label, 2 for displaying the Department Contact and Telephone Number. And other 2 for display Department Contact Name and Telephone Number when the related button is clicked. And the last label is at the bottom of the form to display the name. In all the buttons button_click event is trapped to display the name and number in the label. Application.exit is used to exit from the form.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Button1 is used to display Customer Relations contact and telephone number
Label2.Text = "Tricia Mills"
Label4.Text = "500-1111"
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Button2 is used to display Marketting contact and telephone number
Label2.Text = "Michelle Rigner"
Label4.Text = "500-2222"
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Button1 is used to display order processing contact and telephone number
Label2.Text = "Kenna DeVoes"
Label4.Text = "500-3333"
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
'Button4 is used to display Shipping contact and telephone number
Label2.Text = "Eric Martin"
Label4.Text = "500-4444"
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
'Button5 is used to exit from the application
Application.Exit()

End Sub
End Class

Screenshot of the code output after adding the buttons and labels in execution mode.


Related Solutions

create a Visual Basic project with the following features: 1. The user interface can display the...
create a Visual Basic project with the following features: 1. The user interface can display the following information, one textbox for one item: 1a. Author, in the form of Lastname, Firstname 1b. Title 1c. Source -- where the paper is published 1d. Abstract 1e. Publication year (This information is in the 1c. Source, but display the publication year separately here) 2. There is a command button "Import". It would allow the user to select the eric.txt as the input file...
In this project, you will create a Visual Basic solution to perform customer billing at the...
In this project, you will create a Visual Basic solution to perform customer billing at the Cyberian Internet Cafe. Please see below for the detailed instructions. You will create the project and then design a form using the image provided here. Then, add the necessary code to do the billing calculation and display the amount due. Instructions In this case, you will create a Visual Basic solution that performs customer billing for the Cyberian Internet Café. The Cyberian Internet Café...
Create a new “Area” project. Create a new Visual Studio Project and call it “Area”. This...
Create a new “Area” project. Create a new Visual Studio Project and call it “Area”. This project will be used to calculate the area of certain figures, like circles, squares and rectangles. So add a title to the Form. The Form Title should say “Area”. Also add 3 labels, 3 Buttons, 3 Textboxes and 3 RadioButtons. The 3 Buttons should be near the bottom of the Form and say “Calc Area”, “Clear” and “Exit”. Make sure to give all your...
Using If-Else conditional statement write a Visual Basic Program to display: (i) “STOP” if the user...
Using If-Else conditional statement write a Visual Basic Program to display: (i) “STOP” if the user enters “R” (ii) “CAUTION” if the user enters “Y” (iii) “GO” if the user enters “G” (iv) “Invalid” if the user enters any other character
Create a Visual Studio console project named exercise093. In the exercise093.cpp file first define a function...
Create a Visual Studio console project named exercise093. In the exercise093.cpp file first define a function void lowerToUpper(std::string & sentence) that iterates over all characters in the sentence argument. Any lowercase letter should be converted to uppercase. This can be done by including <cctype> and testing each character in sentence with the islower() function. If islower(sentence[i]) returns true then sentence[i] should be replaced with toupper(sentence[i]). The main() function should assign "Hello how are you doing?" to sentence, call lowerToUpper(sentence), and...
Use Visual Basic Language In this assignment you will need to create a program that will...
Use Visual Basic Language In this assignment you will need to create a program that will have both a “for statement” and an “if statement”. Your program will read 2 numbers from the input screen and it will determine which is the larger of the 2 numbers. It will do this 10 times. It will also keep track of both the largest and smallest numbers throughout the entire 10 times through the loop. An example of the program would be...
As a group of engineers with basic Visual Basic skills, you are asked to provide your...
As a group of engineers with basic Visual Basic skills, you are asked to provide your client with a user-friendly macro-enabled Excel spreadsheet that can be used to calculate the deflection and bending moment of a simply supported beam and a cantilever beam. The spreadsheet will provide a user-friendly interface to allow the client to: i) define the type of beam (i.e. a simply supported beam or a cantilever beam); ii) define cross sectional properties of a given beam structure;...
Description: To create a Visual Basic program that will obtain a sentence from the user, parse...
Description: To create a Visual Basic program that will obtain a sentence from the user, parse the sentence, and then display a sorted list of the words in the sentence with duplicate words removed. Tasks: Design a method (algorithm) to solve the above problem using pseudocode or a flowchart. Translate your algorithm into an appropriate VB program and test it using the following input sentence. "We are the world We are the children" Submit: Pseudocode version of algorithm/Flowchart version of...
Program on Visual Basic, VBA Create an application that lets the user enter a number of...
Program on Visual Basic, VBA Create an application that lets the user enter a number of seconds and produces output according to the following criteria: There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or...
Create a program in visual basic that allows the user to manage vehicle information including: •...
Create a program in visual basic that allows the user to manage vehicle information including: • License plate number • Owner name • Owner phone number The user interface will be GUI-based providing the following capabilities: • Add up to 100 vehicles • Remove specified vehicles • View a sorted list of all known license plates • View the data for a specified vehicle • Save the database contents into a file • Load a saved database from a file
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT