Explanation of Solution
Program
Public Class frmMain
'Declaring variables of type double and initializing with values
'variable twin
Dim twin As Double = 39.99
'variable full
Dim full As Double = 49.99
'variable queen
Dim queen As Double = 49.99
'variable king
Dim king As Double = 69.99
'variable totalCost
Dim totalCost As Double = 0
'variable shippingFee
Dim shippingFee As Double
'calculating total cost after clicking on button
Private Sub btnCost_Click(sender As Object, e As EventArgs) Handles btnCost.Click
'displaying total cost in textbox and Math.Round() is used to round the totalcost to two decimal places
txtCost.Text = String.Format("$" + Math.Round((totalCost + shippingFee), 2).ToString())
End Sub
'exit button click
Private Sub btnExit_Click (sender As Object, e As EventArgs) Handles btnExit.Click
Application.Exit()
End Sub
'checkbox CheckedChanged() event
Private Sub chkpickup_CheckedChanged(sender As Object, e As EventArgs) Handles chkpickup.CheckedChanged
'if checkbox is checked then
If (chkpickup.Checked = True) Then
'assign the shipping fee to the variable shippingFee
shippingFee = 5
Else
'else shippingFee is zero
shippingFee = 0
End If
End Sub
'radio button twin CheckedChanged() event
Private Sub rbtTwin_CheckedChanged(sender As Object, e As EventArgs) Handles rbtTwin.CheckedChanged
'if radio button is changed the clear values from textbox
txtCost.Text = ""
If (rbtTwin...
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
EBK 3N3-EBK: PROGRAMMING W/MICROSOFT VI
- When you drag a field object to an existing control in the interface, Visual Basic replaces the existing control with a new control.a. True b. Falsearrow_forwardTrue or False Forms and most controls have a Preferences property that allows you to change the object’s background color.arrow_forwardThis is for Visual Basic I and is not in a textbook. Create a Windows Form application. Use the following names for the project and solution, respectively: NFL Teams Project and NFL Teams Solution. Add any 6 NFL teams to a list box. When the user clicks a team in the list box, the list box’s SelectedIndexChanged procedure should display the State that the NFL Team is from in a label control. Example "Altanta Falcons" display Georgia, in the label. Look back at Chapter 5 for examples of list boxes. I need some help understanding it. My teacher gave this to me as a example question.arrow_forward
- Pearson Charity: Donation Form Please complete the form. Mandatory fields are marked with a * PERSONAL INFORMATION DETAILS- For example: John Doe For example: 012-345-6789 For example:user@domain.com Select an option Name * Phone* Email * Gender* DONATION DETAILS Amount* Fund* Donate Any amount between R1 - R1000 Select an optionarrow_forwardThe application must allow the user to enter the student ID. When the search button is clicked, it should open a text file with the list of students, then search for the student ID in the text file. Once the ID has been found, it should show the full student details in a textbox as shown below: Siyabonga School App Welcome to Siyabonga School Enter Student ID 0006043432 Manaane Van Der Wait 0006043432 Grade 6 Search X1ipg Eing Aingarrow_forwardCreate a Windows Forms application. Use the following names for the project and solution, respectively: OnYourOwn Project and OnYourOwn Solution. Save the application in the VB2017\Chap02 folder. Plan and design an application of your choice. The only requirement is that you must follow the minimum guidelines listed in Figure 2-22. Before starting the application, be sure to verify the name of the startup form. Save the solution and then start and test the application.arrow_forward
- When you create a new Windows Forms project, by default the first Form you see is namedarrow_forwardWhen a form has been modifi ed since the last time it was saved, whatappears on its tab in the designer window?arrow_forwardInput data: Feet: User enters a number for feet Period: User enters a number for inches Instructions: Create a new project and name it as yourlastname-firstname-Assignment5. Save this project in VB folder you created earlier. Change form’s title to: Your full name – Assignment 5 - Conversion. Form contains four Labels, two TextBoxes, and three Button controls. Use labels to identify Feet, Inches and Meters. See below Form Layout with Controls for more details. Note: You will use the same control Names shown below. - Input variables: Feet (Single) - TextBox, txtFeet Inches (Single) - TextBox, txtInches - Output variables: Meters (Single) -Label, lblMeters To convert feet and inches to meters, use this formula: (feet * 12 + inches) * 0.0254. 0.0254 is a constant value to convert English system to Metric. Make sure to declare a Constant for this literal number. You construct a Function for this conversion. It will be placed after End Sub for btnConvert_Click. Start…arrow_forward
- Create a Windows Forms application. Use the following names for the project and solution, respectively: OnYourOwn Project and OnYourOwn Solution. Save the application in the VB2017\Chap10 folder. Plan and design an application of your choice. The only requirement is that you must follow the minimum guidelines listed in Figure 10-45. Before starting the application, be sure to verify the name of the startup form. Save the solution and then start and test the application.arrow_forwardAssignment on GUI Create a Java Swing Application named CarShowRoom. You have to first design the UI using swing package and then write event handling code as per the following specifications. Tasks: Use Flow Layout Create a combobox containing the brands of different cars such as Audi, BMW etc. Use 5 brands as per your choice in the combobox. Create a button “show” Create a TextArea which will initially be empty. When an item is selected from the combobox and the button “show” is pressed, that TextArea will show the number of cars of that model available, price of each car, colors available and some unique features of that car. Every time an item is selected from the combobox, the details of this item will be appended to the previous information already showed in the textarea. The TextArea will not be refreshed. Create another TextField which will be invisible till a car is booked (after clicking the button “book”). Create another button “book”. When this button is clicked, the…arrow_forwardMicrosoft Visual Basic Studio 2017 Please Create an application that allows the user to enter the gender (either F or M) and GPA for any number of students. The application should calculate the average GPA for all students, the average GPA for male students, and the average GPA for female students. Create a Windows Forms application. Use the following names for the project and solution respectively: Final Project and Final Solution. 1. Change the form file’s name to Main Form.vb 2. Change the form’s Name property to frmMain. 3. Change the form’s Font property to Segoe UI, 9pt. 4. Change the form’s MaximizeBox property to False. 5. Change the form’s StartPosition property to Centerscreen. 6. Build the interface and then code the Exit button The application’s interface is shown in the figure below. The list box should list GPAs from 1.0 through 4.0 in increments of 0.5. 7. Display information that you do not want the user to change during run time in a label. Change the following label…arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,