<p style="MARGIN: 0px">Introduction . . . . . . . . . . . . . xvii</p> <p style="MARGIN: 0px">Part I: The Visual Basic 2015 Environment</p> <p style="MARGIN: 0px">Hour 1: Jumping in with Both Feet: A Visual Basic 2015 Programming Tour . 1</p> <p style="MARGIN: 0px"> Starting Visual Basic 2015 . . . . . . . . . . 2</p> <p style="MARGIN: 0px"> Creating a New Project . . . . . . . . . . 3</p> <p style="MARGIN: 0px"> Understanding the Visual Studio 2015 Environment . . . . . 6</p> <p style="MARGIN: 0px"> Changing the Characteristics of Objects . . . . . . . 7</p> <p style="MARGIN: 0px"> Adding Controls to a Form. . . . . . . . . 13</p> <p style="MARGIN: 0px"> Designing an Interface . . . . . . . . . . 15</p> <p style="MARGIN: 0px"> Writing the Code Behind an Interface. . . . . . . 20</p> <p style="MARGIN: 0px"> Running a Project . . . . . . . . . . . 24</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 27</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 28</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 28</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . . 29</p> <p style="MARGIN: 0px">Hour 2: Navigating Visual Basic 2015 . . . . . . . . 31</p> <p style="MARGIN: 0px"> Using the Visual Basic 2015 Start Page . . . . . . . 31</p> <p style="MARGIN: 0px"> Navigating and Customizing the Visual Basic Environment . . . 34</p> <p style="MARGIN: 0px"> Working with Toolbars . . . . . . . . . . 40</p> <p style="MARGIN: 0px"> Adding Controls to a Form Using the Toolbox . . . . . . 41</p> <p style="MARGIN: 0px"> Setting Object Properties Using the Properties Window . . . . 43</p> <p style="MARGIN: 0px"> Managing Projects . . . . . . . . . . . 50</p> <p style="MARGIN: 0px"> A Quick-and-Dirty Programming Primer. . . . . . . 57</p> <p style="MARGIN: 0px"> Getting Help. . . . . . . . . . . . 59</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 60</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 60</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 61</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . . 61</p> <p style="MARGIN: 0px">Hour 3: Understanding Objects and Collections . . . . . . 63</p> <p style="MARGIN: 0px"> Understanding Objects . . . . . . . . . . 64</p> <p style="MARGIN: 0px"> Understanding Properties. . . . . . . . . . 64</p> <p style="MARGIN: 0px"> Understanding Methods. . . . . . . . . . 72</p> <p style="MARGIN: 0px"> Building a Simple Object Example Project . . . . . . . 73</p> <p style="MARGIN: 0px"> Understanding Collections . . . . . . . . . 79</p> <p style="MARGIN: 0px"> Using the Object Browser . . . . . . . . . . 82</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 84</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 84</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 85</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . . 85</p> <p style="MARGIN: 0px">Hour 4: Understanding Events . . . . . . . . . . 87</p> <p style="MARGIN: 0px"> Understanding Event-Driven Programming . . . . . . 87</p> <p style="MARGIN: 0px"> Building an Event Example Project . . . . . . . . 97</p> <p style="MARGIN: 0px"> Keeping Event Names Current . . . . . . . . 103</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 103</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 104</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 104</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 105</p> <p style="MARGIN: 0px">Part II: Building a User Interface</p> <p style="MARGIN: 0px">Hour 5: Building Forms: The Basics . . . . . . . . 107</p> <p style="MARGIN: 0px"> Changing a Form’s Name . . . . . . . . . 108</p> <p style="MARGIN: 0px"> Changing a Form’s Appearance . . . . . . . . 109</p> <p style="MARGIN: 0px"> Showing and Hiding Forms . . . . . . . . . 122</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 128</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 128</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 129</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 130</p> <p style="MARGIN: 0px">Hour 6: Building Forms: Advanced Techniques . . . . . . 131</p> <p style="MARGIN: 0px"> Working with Controls . . . . . . . . . . 131</p> <p style="MARGIN: 0px"> Creating Topmost Nonmodal Windows. . . . . . . 151</p> <p style="MARGIN: 0px"> Creating Transparent Forms . . . . . . . . . 151</p> <p style="MARGIN: 0px"> Creating Scrollable Forms . . . . . . . . . 152</p> <p style="MARGIN: 0px"> Creating MDI Forms . . . . . . . . . . 154</p> <p style="MARGIN: 0px"> Setting the Startup Form . . . . . . . . . 158</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 159</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 160</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 160</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 161</p> <p style="MARGIN: 0px">Hour 7: Working with Traditional Controls . . . . . . . 163</p> <p style="MARGIN: 0px"> Displaying Static Text with the Label Control. . . . . . 163</p> <p style="MARGIN: 0px"> Allowing Users to Enter Text Using a Text Box. . . . . . 164</p> <p style="MARGIN: 0px"> Creating Buttons. . . . . . . . . . . 172</p> <p style="MARGIN: 0px"> Creating Containers and Groups of Option Buttons . . . . . 176</p> <p style="MARGIN: 0px"> Displaying a List with the List Box . . . . . . . . 180</p> <p style="MARGIN: 0px"> Creating Drop-Down Lists Using the Combo Box . . . . . 188</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 190</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 191</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 191</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 192</p> <p style="MARGIN: 0px">Hour 8: Using Advanced Controls. . . . . . . . . 193</p> <p style="MARGIN: 0px"> Creating Timers . . . . . . . . . . . 193</p> <p style="MARGIN: 0px"> Creating Tabbed Dialog Boxes . . . . . . . . 197</p> <p style="MARGIN: 0px"> Storing Pictures in an Image List Control . . . . . . 200</p> <p style="MARGIN: 0px"> Building Enhanced Lists Using the List View Control . . . . 202</p> <p style="MARGIN: 0px"> Creating Hierarchical Lists Using the Tree View Control . . . . 207</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 211</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 212</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 212</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 213</p> <p style="MARGIN: 0px">Hour 9: Adding Menus and Toolbars to Forms . . . . . . 215</p> <p style="MARGIN: 0px"> Building Menus . . . . . . . . . . . 215</p> <p style="MARGIN: 0px"> Using the Toolbar Control . . . . . . . . . 229</p> <p style="MARGIN: 0px"> Creating a Status Bar . . . . . . . . . . 235</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 237</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 237</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 238</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 238</p> <p style="MARGIN: 0px">Part III: Making Things Happen—Programming</p> <p style="MARGIN: 0px">Hour 10: Creating and Calling Code Procedures . . . . . . 239</p> <p style="MARGIN: 0px"> Creating Visual Basic Code Modules . . . . . . . 239</p> <p style="MARGIN: 0px"> Writing Code Procedures . . . . . . . . . 242</p> <p style="MARGIN: 0px"> Calling Code Procedures . . . . . . . . . 248</p> <p style="MARGIN: 0px"> Exiting Procedures. . . . . . . . . . . 254</p> <p style="MARGIN: 0px"> Avoiding Infinite Recursion . . . . . . . . . 255</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 256</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 257</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 257</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 258</p> <p style="MARGIN: 0px">Hour 11: Using Constants, Data Types, Variables, and Arrays . . . . 259</p> <p style="MARGIN: 0px"> Understanding Data Types. . . . . . . . . 260</p> <p style="MARGIN: 0px"> Defining and Using Constants . . . . . . . . 263</p> <p style="MARGIN: 0px"> Declaring and Referencing Variables . . . . . . . 266</p> <p style="MARGIN: 0px"> Working with Arrays . . . . . . . . . . 273</p> <p style="MARGIN: 0px"> Determining Scope . . . . . . . . . . 276</p> <p style="MARGIN: 0px"> Declaring Variables of Static Scope . . . . . . . . 281</p> <p style="MARGIN: 0px"> Using Variables in Your Picture Viewer Project. . . . . . 282</p> <p style="MARGIN: 0px"> Renaming Variables . . . . . . . . . . 286</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 287</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 288</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 288</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 289</p> <p style="MARGIN: 0px">Hour 12: Performing Arithmetic, String Manipulation, and Date/Time Adjustments . .. 291</p> <p style="MARGIN: 0px"> Performing Basic Arithmetic Operations with Visual Basic . . . 291</p> <p style="MARGIN: 0px"> Comparing Equalities . . . . . . . . . . 295</p> <p style="MARGIN: 0px"> Understanding Boolean Logic. . . . . . . . . 296</p> <p style="MARGIN: 0px"> Manipulating Strings. . . . . . . . . . 298</p> <p style="MARGIN: 0px"> Working with Dates and Times . . . . . . . . 304</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 309</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 310</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 310</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 311</p> <p style="MARGIN: 0px">Hour 13: Making Decisions in Visual Basic Code . . . . . . 313</p> <p style="MARGIN: 0px"> Making Decisions Using If...Then. . . . . . . 313</p> <p style="MARGIN: 0px"> Branching Within a Procedure Using GoTo . . . . . . 324</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 326</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 327</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 327</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 328</p> <p style="MARGIN: 0px">Hour 14: Looping for Efficiency . . . . . . . . . 329</p> <p style="MARGIN: 0px"> Looping a Specific Number of Times Using For...Next . . . . 329</p> <p style="MARGIN: 0px"> Using Do...Loop to Loop an Indeterminate Number of Times . . . 336</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 341</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 341</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 342</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 342</p> <p style="MARGIN: 0px">Hour 15: Debugging Your Code . . . . . . . . . 343</p> <p style="MARGIN: 0px"> Adding Comments to Your Code . . . . . . . . 344</p> <p style="MARGIN: 0px"> Identifying the Two Basic Types of Errors . . . . . . 346</p> <p style="MARGIN: 0px"> Using Visual Basic’s Debugging Tools . . . . . . . 349</p> <p style="MARGIN: 0px"> Breaking Only When a Condition Is Met. . . . . . . 358</p> <p style="MARGIN: 0px"> Breaking Only When a Breakpoint Is Hit a Certain Number of Times . 359</p> <p style="MARGIN: 0px"> Sending Messages to the Output Window Using Tracepoints. . . 360</p> <p style="MARGIN: 0px"> Writing an Error Handler Using Try...Catch...Finally . . . 360</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 368</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 368</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 368</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 369</p> <p style="MARGIN: 0px">Hour 16: Designing Objects Using Classes . . . . . . . 371</p> <p style="MARGIN: 0px"> Understanding Classes. . . . . . . . . . 372</p> <p style="MARGIN: 0px"> Instantiating Objects from Classes . . . . . . . . 381</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 388</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 388</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 388</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 389</p> <p style="MARGIN: 0px">Hour 17: Interacting with Users . . . . . . . . . 391</p> <p style="MARGIN: 0px"> Displaying Messages Using the MessageBox.Show() Function. . . 391</p> <p style="MARGIN: 0px"> Creating Custom Dialog Boxes. . . . . . . . 398</p> <p style="MARGIN: 0px"> Using InputBox() to Get Information from a User . . . . . 401</p> <p style="MARGIN: 0px"> Interacting with the Keyboard . . . . . . . . 404</p> <p style="MARGIN: 0px"> Using the Common Mouse Events . . . . . . . . 406</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 409</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 410</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 410</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 411</p> <p style="MARGIN: 0px">Hour 18: Working with Graphics . . . . . . . . . 413</p> <p style="MARGIN: 0px"> Understanding the Graphics Object . . . . . . . 413</p> <p style="MARGIN: 0px"> Working with Pens . . . . . . . . . . 416</p> <p style="MARGIN: 0px"> Using System Colors . . . . . . . . . . 417</p> <p style="MARGIN: 0px"> Working with Rectangles . . . . . . . . . 421</p> <p style="MARGIN: 0px"> Drawing Shapes . . . . . . . . . . . 422</p> <p style="MARGIN: 0px"> Drawing Text . . . . . . . . . . . 423</p> <p style="MARGIN: 0px"> Persisting Graphics on a Form . . . . . . . . 425</p> <p style="MARGIN: 0px"> Building a Graphics Project Example . . . . . . . 425</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 432</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 432</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 432</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 433</p> <p style="MARGIN: 0px">Part IV: Working with Data</p> <p style="MARGIN: 0px">Hour 19: Performing File Operations . . . . . . . . 435</p> <p style="MARGIN: 0px"> Using the OpenFileDialog and SaveFileDialog Controls . . . 435</p> <p style="MARGIN: 0px"> Manipulating Files with the File Object. . . . . . . 443</p> <p style="MARGIN: 0px"> Manipulating Directories with the Directory Object . . . . 452</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 453</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 454</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 454</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 455</p> <p style="MARGIN: 0px">Hour 20: Working with the Registry and Text Files . . . . . . 457</p> <p style="MARGIN: 0px"> Working with the Registry . . . . . . . . . 457</p> <p style="MARGIN: 0px"> Reading and Writing Text Files . . . . . . . . 470</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 480</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 481</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 481</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 482</p> <p style="MARGIN: 0px">Hour 21: Working with a Database . . . . . . . . 483</p> <p style="MARGIN: 0px"> Introducing ADO.NET . . . . . . . . . . 484</p> <p style="MARGIN: 0px"> Manipulating Data . . . . . . . . . . 491</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 502</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 502</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 503</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 503</p> <p style="MARGIN: 0px">Hour 22: Printing . . . . . . . . . . . . 505</p> <p style="MARGIN: 0px"> Preparing the Picture Viewer Project . . . . . . . 506</p> <p style="MARGIN: 0px"> Printing and Previewing a Document . . . . . . . 509</p> <p style="MARGIN: 0px"> Changing Printer and Page Settings . . . . . . . 519</p> <p style="MARGIN: 0px"> Scaling Images to Fit a Page . . . . . . . . . 522</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 527</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 528</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 528</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 528</p> <p style="MARGIN: 0px">Hour 23: Sending Emails. . . . . . . . . . 529</p> <p style="MARGIN: 0px"> Understanding the Classes Used to</p> <p style="MARGIN: 0px"> Send Emails . . . . . . . . . . . . 530</p> <p style="MARGIN: 0px"> Sending Email from Your Picture Viewer Application . . . . 530</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 543</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 544</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 544</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 544</p> <p style="MARGIN: 0px">Part V: Deploying Solutions and Beyond</p> <p style="MARGIN: 0px">Hour 24: Deploying Applications . . . . . . . . . 545</p> <p style="MARGIN: 0px"> Understanding ClickOnce Technology. . . . . . . 545</p> <p style="MARGIN: 0px"> Using the Publish Wizard to Create a ClickOnce Application . . . 547</p> <p style="MARGIN: 0px"> Testing Your Picture Viewer ClickOnce Install Program . . . . 552</p> <p style="MARGIN: 0px"> Uninstalling an Application You’ve Distributed . . . . . 553</p> <p style="MARGIN: 0px"> Setting Advanced Options for Creating ClickOnce Programs. . . 556</p> <p style="MARGIN: 0px"> Summary . . . . . . . . . . . . 557</p> <p style="MARGIN: 0px"> Q&A . . . . . . . . . . . . . 557</p> <p style="MARGIN: 0px"> Workshop. . . . . . . . . . . . 557</p> <p style="MARGIN: 0px"> Exercises. . . . . . . . . . . . 558</p> <p style="MARGIN: 0px">Appendix A: The 10,000-Foot View . . . . . . . . 559</p> <p style="MARGIN: 0px">TOC, 9780672337451, 7/19/2015</p> <p style="MARGIN: 0px"> </p>