Instructor Solutions Manual (Page 1 of 221)
SOLUTIONS
MANUAL
For An Introduction to Programming Using Visual Basic 2012, 9th Edition by David I. Schneider
Part A Chapters 2 through 7 :
Page 1-224
Part B Chapters 8 through 11:
Page 225-422 All Chapters Solutions Manual Supplement files download link at the end of this file. 1 / 4
Instructor Solutions Manual (Page 3 of 221)
CONTENTS
Chapter 2 Visual Basic Controls and Events Exercises 2.2 Visual Basic Controls 4 Exercises 2.3 Visual Basic Events 11 Chapter 3 Variables, Input, and Output Exercises 3.1 Numbers 16 Exercises 3.2 Strings 20 Exercises 3.3 Input and Output 29 Programming Projects 33 Chapter 4 Decisions Exercises 4.1 Relational and Logical Operators 37 Exercises 4.2 If Blocks 37 Exercises 4.3 Select Case Blocks 51 Exercises 4.4 Input via User Selection 61 Programming Projects 71 Chapter 5 General Procedures
Exercises 5.1 Function Procedures 80
Exercises 5.2 Sub Procedures, Part I 86 Exercises 5.3 Sub Procedures, Part II 94 Programming Projects 99 Chapter 6 Repetition
Exercises 6.1 Do Loops 108 Exercises 6.2 For…Next Loops 117 Exercises 6.3 List Boxes and Loops 128 Programming Projects 142 Chapter 7 Arrays Exercises 7.1 Creating and Using Arrays 151 Exercises 7.2 Using LINQ with Arrays 165 Exercises 7.3 Arrays of Structures 175 Exercises 7.4 Two-Dimensional Arrays 190 Programming Projects 203 Part A 2 / 4
Instructor Solutions Manual (Page 4 of 221)
CHAPTER 2
EXERCISES 2.2
- While the mouse is still hovering over the button that was just clicked, the button has a pale
blue color.
2.Tabbing to another control, clicking on another control, or pressing Alt plus the access key for another control.
3.Click on the form to make it the selected object.Click on the Properties window or Press F4 to activate the Properties window.Select the Text property.Type "CHECKING ACCOUNT" and press the Enter key.
4.Double-click the TextBox icon in the Toolbox.Activate the Properties window, and select the ForeColor property.Click on the down-arrow button to the right of the Settings box.Click on the Custom tab.Click on the desired blue in the palette.Move around the Properties window with the up- and down-arrow keys until the Textproperty is selected.Click on the Settings box and then type "PLAY IT, SAM" (without the quotes).Click on the text box and then widen it slightly to see the words.
5.Double-click the TextBox icon in the Toolbox.Activate the Properties window.Select the BackColor property.Click on the down-arrow to the right of the Settings box.Click on the Custom tab, and then click on the desired yellow in the palette.Click on the form to see the empty yellow text box.
6.Double-click on the TextBox icon in the Toolbox.Activate the Properties window, and select the Name property.Type "txtGreeting". (The name will appear in the Settings box.)Select the Text property.Type the requested word, "HELLO".Select the Font property.Click on the ellipsis to the right of the Settings box.Click on the Size box.To increase the size of the word, either type the number for the font size (such as "14") or click on a number in the list below the current size.Click on Italic in the "Font style" list.Click OK.If necessary, widen the text box. 3 / 4
Instructor Solutions Manual (Page 5 of 221)
- Double-click on the Label icon in the Toolbox.
Activate the Properties window, and select the AutoSize property.Set the AutoSize property to False.Select the Text property and type the requested sentence.Select the TextAlign property.Click on the down-arrow button to the right of the Settings box, and click on one of the center rectangles.Resize the label so that the sentence occupies three lines.
- Double-click on the TextBox icon in the Toolbox.
Activate the Properties window, and select the Text property.Type "Visual Basic" and then press the Enter key.If the text isn't all visible, drag the text box's right sizing handle to the right until all the text can be seen.Select the ReadOnly property.Double-click on the ReadOnly property to change it's setting to True. (Or, go to the Settings box, press the down-arrow button, and click on True.) Select the Font property.Click on the ellipsis to the right of the Settings box.In the Font style box, click on Bold.Click OK.Select the BackColor property and click on the down-arrow button.Click on the Custom tab.Click on the desired red in the palette.Select the ForeColor property and click on the down-arrow button.Click on the Custom tab.Click on the white square in the upper-left corner of the palette.
- Double-click on the TextBox icon in the Toolbox.
Activate the Properties window.Set the Name property to txtLanguage.Select the Text property and type "Visual Basic 2012".Select the Font property and click on the ellipsis to the right of the Settings box.Scroll up the Font list box, and click on Courier New in the Font box.Click OK.Widen the text box to accommodate its text.
- Double-click on the Button icon in the Toolbox.
- / 4
Activate the Properties window, and select the Text property.Type "PUSH".Select the BackColor property and click on the down-arrow button.Click on the Custom tab.Click on the yellow square (the third square in the fourth column) in the palette.Double-click on the setting for the (Name) property, type in "btnPush", and press the Enter key.