Question

The following table shows lists of six states and their official abbreviations.StateAbbreviationsVirginiaVANorth CarolinaNCTexasTXGeorgiaGAAlabamaALFloridaFLCreate an application that...

The following table shows lists of six states and their official abbreviations.StateAbbreviationsVirginiaVANorth CarolinaNCTexasTXGeorgiaGAAlabamaALFloridaFLCreate an application that allows the user to select a state and then displays thatstate’s official abbreviation. The form should have seven buttons, one for each state and an Exit button. The application should perform the following actions:When the user clicks on Virginia, the application should display VA in a Message Box.When the user clicks on North Carolina, the application should display NC in a StatusStrip Control.When the user clicks on Texas, the application should display TX in a Label Control.When the user clicks on Georgia, the application should display GAin a StatusStrip Control.When the user clicks on Alabama, the application should display AL in a Message Box.When the user clicks on Florida, the application should display FL in a Label Control.When the user clicks on Exit, the application should close.

Using Visual Basic

Homework Answers

Answer #1

Answer)

The code. ' is used for comments.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'display in the message box
   MsgBox("VA")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'StatusStrip1 by default it is false
   StatusStrip1.Visible = True
ToolStripStatusLabel1.Text = "NC"
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'displayed in a label
   Label1.Text = "TX"
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
StatusStrip1.Visible = True
ToolStripStatusLabel1.Text = "GA"
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
MsgBox("AL")
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Label2.Text = "FL"
End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
'button7 is used for exit   

'close the current form for exit
   'me is used to refre the current form
   Me.Close()
End Sub
End Class

Screenshot

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a Python  program with correct indentation that creates a dictionary containing the U.S. states as keys...
Write a Python  program with correct indentation that creates a dictionary containing the U.S. states as keys and their abbreviations as values. The program should then randomly quiz the user by displaying the abbreviation and asking the user to enter that state's name. The program should keep a count of the number of correct and incorrect responses, as well as which abbreviation the user missed. You should include the following: Mainline logic and functions Error handling Dictionaries A file is attached...
java programming 1.Create a simple SWING Form to Display Student Data.The top part of the form...
java programming 1.Create a simple SWING Form to Display Student Data.The top part of the form should say “Student Information”.The middle part of the form will contain labels and textFields; one each for ID, FirstName, LastName, Email and GPA.The bottom part should have 5 Buttons that read “Find”, “Insert”, “Delete”, “Update” and “Exit”. 2.Add a few neat SWING features, like tooltips, borders, colors, etc. Also the Exit button should work and the “X” at the top right of the Window...
Create a Windows application that can be used to change the form color. Your form background...
Create a Windows application that can be used to change the form color. Your form background color should initially be blue. Provide at least two buttons with two different color choices and a Reset option. Change the font style and size on buttons. Align the buttons so that they are in the center of the form. The color choice buttons should be the same size. Add event handlers for the buttons so that when the user click the button, the...
For this assignment you'll be creating an application that has the user input a subtotal, tax...
For this assignment you'll be creating an application that has the user input a subtotal, tax rate and tip percentage and then displays the sales tax, tip amount and the total. You'll use JQuery instead of the getElementByX functions AND you will display all messages on the page (no alert or prompt boxes) The starter file is based off of the Lab 2 sales_tax application. Feel free to borrow code from your lab solution but realize you will need to...
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private...
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private data fields to store the account holder's name and the account balance A constructor with 0 arguments A constructor with 1 argument (account holder's name) A constructor with 2 arguments(account holder's name and account balance) Public properties for the account holder's name and the account balance. Do not use auto-implemented properties. A method to increase the balance (deposit) A method to decrease the balance...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS OR SWITCH STATEMENTS IN THE JAVASCRIPT. Even though there is stylesheet in the HTML file do no create a new one. Project Standards: Students will use click events to capture user input. Students will use variables to store information needed by their application and keep track of their program’s state. Students will use conditionals to control project flow. Project Task You will be building...
The premise of this project is to make a basic GUI and code for the game...
The premise of this project is to make a basic GUI and code for the game Keno. The specifics of the gui and game are below. Description: In this project you will implement the popular casino and state lottery game, Keno. This is a somewhat simple game to understand and play which should allow you to focus on learning GUI development in JavaFX and trying your hand at event driven programing. Implementation Details: You may add as many classes, data...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
Compile and execute the application. You will discover that is has a bug in it -...
Compile and execute the application. You will discover that is has a bug in it - the filled checkbox has no effect - filled shapes are not drawn. Your first task is to debug the starter application so that it correctly draws filled shapes. The bug can be corrected with three characters at one location in the code. Java 2D introduces many new capabilities for creating unique and impressive graphics. We’ll add a small subset of these features to the...
Case stydy - customers Businesses of all sizes are finding Facebook, Twitter, and other social media...
Case stydy - customers Businesses of all sizes are finding Facebook, Twitter, and other social media to be powerful tools for engaging customers, amplifying product messages, discovering trends and influencers, building brand awareness, and taking action on customer requests and recommendations. Half of all Twitter users recommend products in their tweets. About 1.6 billion people use Facebook, and more than 30 million businesses have active brand pages, enabling users to interact with the brand through blogs, comment pages, contests, and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT