Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you will create a windows forms application that, upon the press of a button, will display the state capital based upon the

In this assignment you will create a windows forms application that, upon the press of a button, will display the state capital based upon the state checked in one of three radio buttons. The state capital name is cleared when the states radio button changes. A proposed GUI for this application is presented below. The solution name assigned to this application is State Capitals Solution while the project name is State Capitols project.In this assignment you will create a windows forms application that, upon the press of a button, will
display the state capital based upon the state checked in one of three radio buttons. The state capital
name is cleared when the states radio button changes. A proposed GUI for this application is presented
below. The solution name assigned to this application is State Capitals Solution while the project
name is State Capitols project.
After you have created the solution in Visual Studio, open the Designer window, select the main
form and then Modify the form file name and properties as follows
a. Change the form file's name to Main Form.vb (A4)
b. Change the form's Name property to frmMain (A5)
c. Change the form's Font property to Segoe UI,9pt (A5)
d. Change the form's MaximizeBox property to False (A5)
e. Change the form's StartPosition property to CenterScreen (A5)
f. Change the form's Text property to States and Capitals (A5)
Add three buttons to the form. Create a group box named "States" placing the three buttons
in the States group box. Change each radio button's Name and Text properties as follows,
Then make "Connecticut the default button
a. Top button: radConnecticut, "Connecticut"
b. Middle button: radAlabama, "Alabama"
c. Bottom button: radlllinois, "Illinois"
Add two labels to the form. The first will be the identifying label for the second label.
Change the text property of the identifying label to "Capital:". Name the second label
lblCapital. This label will display the capital of the state whose radio button is checked. Set
this label to blank at design time.
Create a button called btnDisplay with the text property of "Display". When this button is
clicked, the the button's click event procedure will display in the Capital label (lblCapital),
the capital of the state radio button that is checked. Use the pseudo-code below to code the
click event procedure of this button.
Display the capital of the selected state based upon the radio button selected
if the Alabama radio button is checked
display "Montgomery" on the GUI
else if the Connecticut radio button is checked
display "Hartford" on the GUI
else if the Illinois radio button is checked
display "Springfield" on the GUI
endif
Create a button called btn Exit with the text property of "Exit". Close the application when
this button is clicked.
Create a CheckedChanged event procedure for each radio button. In that event procedure
clear the Capital label on the GUI. For extra credit, create only one radio button
CheckedChanged event procedure that handles the CheckedChanged events for all three radio
buttons. Please refer to eBook to learn how to create and code this event handler.
Start the application by clicking the Start button on the Visual Studio menu. Test the application
by clicking a various states, then clicking the "Display" button. The state capital name associated
with the state that is checked should appear in the label on the GUI. For example, if the Illinois
radio button is checked, "Springfield" should appear in the label. When one of the other radio
buttons is checked ("Connecticut" or "Alabama", the capital in the label should be cleared.
Create a programming assignment folder per the video in Week 1 Reading and Course Materials.
The name of your assignment folder should be WK7 C4P "your last name" In the folder, place the
.exe file and an image of the Main Form.vb file (pdf or .jpeg or .png). Zip the folder per the video
and submit it as the assignment solution file.
image text in transcribed

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

Recommended Textbook for

More Books

Students also viewed these Databases questions