Explanation of Solution
Program
Public Class frmMain
'declaring variables of string type
Dim capital As String
Dim state As String
'display button click
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
'display state and capital on label
lblCapital.Text = String.Format(" State : {0} , Capital is : {1}", state, capital)
'change forecolor of label
lblCapital.ForeColor = Color.Maroon
'change backcolor of label
lblCapital.BackColor = Color.Yellow
End Sub
'Exit button click
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
'when this button clicked close the application
Application.Exit()
End Sub
'checkChanged event for radio button texas
Private Sub rbtTaxas_CheckedChanged(sender As Object, e As EventArgs) Handles rbtTaxas.CheckedChanged
'clear text on label
lblCapital.Text = ""
'if radio button texas is checked
If rbtTaxas.Checked = True Then
'set the value of variable capital
capital = "Austin"
'set the state name as radio button text
state = rbtTaxas.Text
End If
End Sub
'checkChanged event for radio button washington
Private Sub rbtWashington_CheckedChanged(sender As Object, e As EventArgs) Handles rbtWashington.CheckedChanged
'clear text on label
lblCapital.Text = ""
'if radio button washington is checked
If rbtWashington.Checked = True Then
'set the value of variable capital
capital = "Olympia"
'set the state name as radio button text
state = rbtWashington...
Trending nowThis is a popular solution!
Chapter 4 Solutions
EBK 3N3-EBK: PROGRAMMING W/MICROSOFT VI
- Which property is used to give a form file a more meaningful name? File File Name Form Name Namearrow_forwardExtra 6-1 Develop the Temperature Converter In this exercise, you’ll use radio buttons to determine whether the conversion is from Fahrenheit to Celsius or vice versa. You’ll also modify the DOM so the labels change when a radio button is clicked, and the page displays an error message when the user enters invalid data. 1. Open the application in this folder: exercises_extrach06convert_temps 2. Note that the JavaScript file has some starting JavaScript code, including the $() function, three helper functions, three event handler functions, and a DOMContentLoaded event handler that attaches the three event handlers. 3. Review how the toCelsius() and toFarhenheit() event handler functions call the toggleDisplay() helper function and pass it strings to display. Also note that the toggleDisplay() helper function and the convertTemp() event handler function are incomplete. 4. Code the toggleDisplay() function so it changes the text in the labels for the text boxes to the values in the…arrow_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_forward
- This 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_forwardUSe Form CS Create an application consists of 1 form with 30 controls: 1 Textbox 3 Radio buttons 2 Buttons 5 Checkboxes Code must be written to respond to the user clicking on the buttons, radio buttons and check boxes. Project requirements: 1. when the application starts the focus must be at the flavor selection list with the first flavor selected, one scoop selected and no toppings selected and the correct total displayed 2. when the "Exit" button is clicked, the application ends 3. the total will be computed and displayed when the user makes a scoop selection and/or toppings selection. 4. when the "Clear" button is clicked, the textbox is cleared. Focus goes to the listbox.. The first flavor is selected, one scoop is selected and no toppings are selected and the correct total is displayed 5. the total dollar amount must be formatted as currency 6. allow multiple flavors to be selected 7. the otal will times be an eflect the ber of scoops and toppings as they are selectedarrow_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
- Include a header that is Your Name, Math Tables Include an "Addition Table" button Include a "Multiplication Table" button Both tables should use the same window for the display of their information In the secondary window, include the following: A comment in the code that includes the assignment name, your name, and the date Use the file name "MathTableDisplay.htm" for the secondary window file The header for the secondary window is "Addition Table" when the addition table is displayed The header for the secondary window is "Multiplication Table" when the multiplication table is displayed Example web page displays and code for the addition table are included belowarrow_forwardQ4/ design a form contain command button such that when we click on command, form2 will be appear and forml will be disappear.arrow_forwardPearson 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_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\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_forwardWhen you create a new Windows Forms project, by default the first Form you see is namedarrow_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\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_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,