Starting Out With Visual C# (5th Edition)
Starting Out With Visual C# (5th Edition)
5th Edition
ISBN: 9780135183519
Author: Tony Gaddis
Publisher: PEARSON
Question
Book Icon
Chapter 9, Problem 7PP
Program Plan Intro

Form design:

  • Open Microsoft Visual Studio 2010.
  • Select C# and click Windows Forms Application.
  • Name the project as StateCapitals.
  • Store the file in desire location.
  • The created project is now display with a form in the name of Form1.
  • Select the Form1 and add the necessary components.
  • In property window, change the Form name and add changes for Form elements properties.
  • Click the File menu->Save All.

View of the form design in the IDE:

Starting Out With Visual C# (5th Edition), Chapter 9, Problem 7PP

The form control properties in the properties window are as follows:

ObjectPropertySetting
Form1TextState Capitals
label1TextWhat is the capital of
stateLabelText(Empty)
label3TextYour Answer:
answerTextBoxText(Empty)
checkAnswerButtonTextCheck Your Answer
endQuizButtonTextEnd Quiz
  • Add a label control to display “What is the capital of”.
  • Add a label control and name it as stateLabel to print random state name.
  • Add a label control to display “Your Answer”.
  • Add a text box control and name it as answerTextBox.
  • Add a button checkAnswerButton to check the answer.
  • Add a button endQuizButton to end the quiz.

Blurred answer

Chapter 9 Solutions

Starting Out With Visual C# (5th Edition)

Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education