Appropriate for all basic-to-intermediate level courses in Visual Basic 2012 programming. Visual Basic 2012 How to Program, Sixth Edition is also appropriate for anyone interested in learning programming with Visual Basic 2012. Created by world-renowned programming instructors Paul and Harvey Deitel, Visual Basic 2012 How to Program , Sixth�Edition introduces all facets of the Visual Basic 2012 language through a hands-on approach with hundreds of working programs. This book has been thoroughly updated to reflect the major innovations Microsoft has incorporated in Visual Basic 2012; all discussions and sample code have been carefully audited against the newest Visual Basic language specification. The Sixth Edition is updated to Visual Studio 2012 and includes new chapters on Windows 8 UI app development, Windows 8 graphics/multimedia, Windows Phone 8 app development and Windows Azure. Readers begin by getting comfortable with the free Visual Basic Express 2012 IDE and basic VB syntax. Next, they build their skills one step at a time, mastering control structures, classes, objects, methods, variables, arrays, and the core techniques of object-oriented programming. With this strong foundation in place, the Deitels introduce more sophisticated techniques, including inheritance, polymorphism, exception handling, strings, GUI's, data structures, generics, and collections. Throughout, the authors show developers how to make the most of Microsoft's Visual Studio tools. A series of appendices provide essential programming reference material on various topics. Cover......Page 1 Contents......Page 10 Preface......Page 18 Before You Begin......Page 32 1 Introduction to Computers, the Internet and Visual Basic......Page 36 1.2 Hardware and Moore’s Law......Page 37 1.3 Data Hierarchy......Page 38 1.4 Computer Organization......Page 40 1.5 Machine Languages, Assembly Languages and High-Level Languages......Page 42 1.6 Object Technology......Page 43 1.7 Internet and World Wide Web......Page 45 1.8 Visual Basic......Page 46 1.8.3 Visual Programming......Page 47 1.8.5 Other Key Contemporary Programming Languages......Page 48 1.10 Microsoft’s Windows® Operating System......Page 49 1.11.2 Free vs. Paid Apps......Page 51 1.13 Visual Studio Integrated Development Environment......Page 52 1.14 Test-Driving the Visual Basic Advanced Painter App in Visual Studio 2012......Page 53 2 Dive Into Visual Studio Express 2012 for Windows Desktop......Page 61 2.2 Overview of the Visual Studio 2012 IDE......Page 62 2.3 Menu Bar and Toolbar......Page 67 2.4 Navigating the Visual Studio IDE......Page 70 2.4.1 Solution Explorer......Page 72 2.4.2Toolbox......Page 73 2.4.3 Properties Window......Page 74 2.5 Using Help......Page 75 2.6 Using Visual App Development to Create a Simple App that Displays Text and an Image......Page 76 2.8 Web Resources......Page 86 3 Introduction to Visual Basic Programming......Page 94 3.1 Introduction......Page 95 3.2 Programmatically Displaying Text in a Label......Page 96 3.2.1 Analyzing the Program......Page 97 3.2.2 Modifying ASimpleApp to Programmatically Change the Label’s Text Property......Page 99 3.3 Addition Program......Page 103 3.4 Building the Addition Program......Page 106 3.5 Memory Concepts......Page 113 3.6 Arithmetic......Page 114 3.7 Decision Making: Equality and Relational Operators......Page 118 3.8 Wrap-Up......Page 123 4 Introduction to Problem Solving and Control Statements......Page 136 4.2 Algorithms......Page 137 4.4 Control Structures......Page 138 4.5 If...Then Selection Statement......Page 141 4.6 If...Then...Else Selection Statement......Page 142 4.7 Nested If...Then...Else Selection Statements......Page 143 4.8 Repetition Statements......Page 144 4.9 Compound Assignment Operators......Page 146 4.10 Formulating Algorithms: Counter-Controlled Repetition......Page 148 4.11 Formulating Algorithms: Nested Control Statements......Page 154 4.12 Using the Debugger: Locating a Logic Error......Page 160 4.12.1 Breakpoints and Running the Program......Page 162 4.12.3 Locals Window......Page 163 4.12.4 Using the Step Over Command to Execute Statements......Page 164 4.13Wrap-Up......Page 165 5 Problem Solving and Control Statements: Part 2......Page 181 5.2 For...Next Repetition Statement......Page 182 5.2.2 General Form of a For...Next Statement......Page 184 5.2.6 Local Type Inference......Page 185 5.4 App: Interest Calculator......Page 187 5.5 Formulating Algorithms: Nested Repetition Statements......Page 191 5.6 Select...Case Multiple-Selection Statement......Page 194 5.7 Do...Loop While and Do...Loop Until Repetition Statements......Page 199 5.8 Using Exit to Terminate Repetition Statements......Page 200 5.10 Logical Operators......Page 201 5.11 App: Dental Payment Calculator......Page 204 5.12Wrap-Up......Page 208 6 Methods......Page 223 6.2 Classes and Methods......Page 224 6.3 Subroutines: Methods That Do Not Return a Value......Page 226 6.4 Functions: Methods That Return a Value......Page 230 6.5 Implicit Argument Conversions......Page 232 6.6 Option Strict and Data-Type Conversions......Page 233 6.7 Passing Arguments: Pass-by-Value vs. Pass-by-Reference......Page 235 6.8 Scope of Declarations......Page 238 6.9 Case Study: Random-Number Generation......Page 241 6.9.1 Scaling and Shifting of Random Numbers......Page 243 6.9.2 Randomly Selecting Images......Page 244 6.9.3 Rolling Dice Repeatedly and Displaying Statistics......Page 246 6.10 Case Study: A Game of Chance......Page 248 6.11 Method Overloading......Page 253 6.12 Optional Parameters......Page 255 6.13 Using the Debugger: Debugging Commands......Page 258 6.14Wrap-Up......Page 259 7 Arrays......Page 273 7.2Arrays......Page 274 7.3 Declaring and Allocating Arrays......Page 275 7.4 Initializing the Values in an Array......Page 276 7.5 Summing the Elements of an Array......Page 277 7.6 Using Arrays to Analyze Survey Results......Page 278 7.7 Die-Rolling App with an Array of Counters......Page 281 7.8 Case Study: Flag Quiz......Page 283 7.9 Passing an Array to a Method......Page 287 7.10 For Each...Next Repetition Statement......Page 290 7.11 Sorting an Array with Method Sort of Class Array......Page 292 7.12 Searching an Array with Linear Search......Page 294 7.13 Searching a Sorted Array with Array Method BinarySearch......Page 296 7.14 Rectangular Arrays......Page 297 7.15 Case Study: Maintaining Grades Using a Rectangular Array......Page 299 7.16 Resizing an Array with the ReDim Statement......Page 309 7.17Wrap-Up......Page 310 8 Files......Page 321 8.2 Data Hierarchy......Page 322 8.3 Files and Streams......Page 324 8.4 Test-Driving the Credit Inquiry App......Page 325 8.5 Writing Data Sequentially to a Text File......Page 327 8.5.1 Class CreateAccounts......Page 330 8.5.2 Opening the File......Page 331 8.5.3 Managing Resources with the Using Statement......Page 332 8.5.4 Adding an Account to the File......Page 333 8.5.5 Closing the File and Terminating the App......Page 334 8.6 Building Menus with the Windows Forms Designer......Page 335 8.7.2 Selecting the File to Process......Page 337 8.7.3 Specifying the Type of Records to Display......Page 338 8.7.4 Displaying the Records......Page 339 8.8 Wrap-Up......Page 342 9 Object-Oriented Programming: Classes and Objects......Page 347 9.2 Classes, Objects, Methods and Instance Variables......Page 348 9.3 Account Class......Page 349 9.4 Value Types and Reference Types......Page 355 9.5 Case Study: Card Shuffling and Dealing Simulation......Page 356 9.6 Case Study: Time Class......Page 362 9.7 Class Scope......Page 369 9.9 Auto-Implemented Properties......Page 370 9.11 Garbage Collection......Page 371 9.12 Shared Class Members......Page 372 9.13 Const and ReadOnly Fields......Page 375 9.14 Shared Methods and Class Math......Page 376 9.16Wrap-Up......Page 377 10 Object-Oriented Programming: Inheritance and Polymorphism......Page 387 10.2 Base Classes and Derived Classes......Page 388 10.3.1 Creating Base Class CommissionEmployee......Page 390 10.3.2 Creating Derived Class BasePlusCommissionEmployee......Page 393 10.3.3 Testing Class BasePlusCommissionEmployee......Page 396 10.5 Protected Members......Page 398 10.6 Introduction to Polymorphism: A Polymorphic Video Game......Page 399 10.7 Abstract Classes and Methods......Page 400 10.8 Case Study: Payroll System Class Hierarchy Using Polymorphism......Page 401 10.8.1 Abstract Base Class Employee......Page 402 10.8.2 Concrete Derived Class SalariedEmployee......Page 404 10.8.3 Concrete Derived Class CommissionEmployee......Page 405 10.8.4 Indirect Concrete Derived Class BasePlusCommissionEmployee......Page 407 10.8.5 Demonstrating Polymorphic Processing......Page 408 10.9 Online Case Study: Interfaces......Page 410 10.10Wrap-Up......Page 411 11 Introduction to LINQ......Page 417 11.1 Introduction......Page 418 11.2 Querying an Array of Primitive-Type Elements Using LINQ......Page 419 11.3 Querying an Array of Reference-Type Elements Using LINQ......Page 422 11.4 Deferred Execution and Transforming Query Results......Page 428 11.5 LINQ Resource Center......Page 429 11.6Wrap-Up......Page 430 12 Databases and LINQ......Page 434 12.1 Introduction......Page 435 12.2 Relational Databases......Page 436 12.3 A Books Database......Page 437 12.4 LINQ to Entities and the ADO.NET Entity Framework......Page 441 12.5 Querying a Database with LINQ......Page 442 12.5.1 Creating the ADO.NET Entity Data Model Class Library......Page 443 12.5.2 Creating a Windows Forms Project and Configuring It to Use the Entity Data Model......Page 447 12.5.3 Data Bindings Between Controls and the Entity Data Model......Page 449 12.6 Dynamically Binding Query Results......Page 454 12.6.1 Creating the Display Query Results GUI......Page 455 12.6.2 Coding the Display Query Results App......Page 456 12.7 Retrieving Data from Multiple Tables with LINQ......Page 458 12.8 Creating a Master/Detail View App......Page 463 12.8.1 Creating the Master/Detail GUI......Page 464 12.8.2 Coding the Master/Detail App......Page 466 12.9 Address Book Case Study......Page 467 12.9.1 Creating the Address Book App’s GUI......Page 468 12.9.2 Coding the Address Book App......Page 469 12.11Wrap-Up......Page 473 13 Web App Development with ASP.NET......Page 481 13.1 Introduction......Page 482 13.2 Web Basics......Page 483 13.3 Multitier App Architecture......Page 484 13.4 Your First Web App......Page 486 13.4.1 Building the WebTime App......Page 488 13.5 Standard Web Controls: Designing a Form......Page 497 13.6 Validation Controls......Page 502 13.7 Session Tracking......Page 508 13.7.2 Session Tracking with HttpSessionState......Page 510 13.7.3 Options.aspx: Selecting a Programming Language......Page 512 13.7.4 Recommendations.aspx: Displaying Recommendations Based on Session Values......Page 516 13.8 Case Study: Database-Driven ASP.NET Guestbook......Page 517 13.8.1 Building a Web Form that Displays Data from a Database......Page 519 13.8.2 Modifying the Code-Behind File for the Guestbook App......Page 524 13.9 Online Case Study: ASP.NET AJAX......Page 525 13.11Wrap-Up......Page 526 14 Windows Forms GUI: A Deeper Look......Page 533 14.2 Controls and Components......Page 534 14.3 Creating Event Handlers......Page 536 14.4 Control Properties and Layout......Page 538 14.5 GroupBoxes and Panels......Page 541 14.6 ToolTips......Page 543 14.7 Mouse-Event Handling......Page 545 14.8 Keyboard-Event Handling......Page 548 14.9 Menus......Page 551 14.10 MonthCalendar Control......Page 560 14.11 DateTimePicker Control......Page 561 14.12 LinkLabel Control......Page 564 14.13 ListBox and CheckedListBox Controls......Page 566 14.14 Multiple Document Interface (MDI) Windows......Page 570 14.15 Visual Inheritance......Page 578 14.16 Animation with the Timer Component......Page 581 14.17Wrap-Up......Page 582 15 Graphics and Multimedia......Page 589 15.2 Drawing Classes and the Coordinate System......Page 590 15.3 Graphics Contexts and Graphics Objects......Page 591 15.4Colors......Page 592 15.5Fonts......Page 599 15.6 Drawing Lines, Rectangles and Ovals......Page 603 15.7 Drawing Arcs......Page 606 15.8 Drawing Polygons and Polylines......Page 609 15.9 Additional Brush Types......Page 610 15.10 Loading, Displaying and Scaling Images......Page 615 15.11 Windows Media Player......Page 617 15.12Printing......Page 618 15.13Wrap-Up......Page 624 Online Chapters......Page 632 A Operator Precedence Chart......Page 633 B Primitive Types......Page 635 C Number Systems......Page 636 C.1 Introduction......Page 637 C.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers......Page 640 C.4 Converting from Binary, Octal or Hexadecimal to Decimal......Page 641 C.5 Converting from Decimal to Binary, Octal or Hexadecimal......Page 642 C.6 Negative Binary Numbers: Two’s-Complement Notation......Page 644 D ASCII Character Set......Page 648 E Unicode®......Page 649 E.1 Introduction......Page 650 E.2 Unicode Transformation Formats......Page 651 E.3 Characters and Glyphs......Page 652 E.5 Using Unicode......Page 653 E.6 Character Ranges......Page 655 F.2 A Simple Console Application......Page 660 F.3 Creating a Console Application......Page 661 A......Page 664 C......Page 665 D......Page 668 F......Page 669 G......Page 670 I......Page 671 L......Page 672 M......Page 673 O......Page 674 P......Page 675 S......Page 676 T......Page 678 W......Page 679 Z......Page 680 Appropriate for all basic-to-intermediate level courses in Visual Basic 2012 programming. Created by world-renowned programming instructors Paul and Harvey Deitel, Visual Basic 2012 How to Program introduces all facets of the Visual Basic 2012 language through a hands-on approach with hundreds of working programs. This book reflects the major innovations Microsoft has incorporated in Visual Basic 2012; all discussions and sample code have been carefully audited against the newest Visual Basic language specification. The 6th Edition is updated to Visual Studio 2012 and includes new chapters on Windows 8 UI app development, Windows 8 graphics/multimedia, Windows Phone 8 app development and Windows Azure. Students begin by getting comfortable with the free Visual Basic Express 2012 IDE and basic VB syntax. Next, they build their skills one step at a time, mastering control structures, classes, objects, methods, variables, arrays, and the core techniques of object-oriented programming. With this strong foundation in place, the Deitels introduce more sophisticated techniques, including inheritance, polymorphism, exception handling, strings, GUI's, data structures, generics, and collections. Throughout, the authors show developers how to make the most of Microsoft's Visual Studio tools. A series of appendices provide essential programming reference material on various topics. The full text downloaded to your computer With eBooks you can: search for key concepts, words and phrases make highlights and notes as you study share your notes with friends eBooks are downloaded to your computer and accessible either offline through the Bookshelf (available as a free download), available online and also via the iPad and Android apps. Upon purchase, you'll gain instant access to this eBook. Time limit The eBooks products do not have an expiry date. You will continue to access your digital ebook products whilst you have your Bookshelf installed. **Appropriate for all basic-to-intermediate level courses in Visual Basic 2012 programming.__Visual Basic 2012 How to Program,__Sixth Edition is also appropriate for anyone interested in learning programming with Visual Basic 2012.**Created by world-renowned programming instructors Paul and Harvey Deitel,, Sixth�Edition introduces all facets of the Visual Basic 2012 language through a hands-on approach with hundreds of working programs. This book has been thoroughly updated to reflect the major innovations Microsoft has incorporated in Visual Basic 2012; all discussions and sample code have been carefully audited against the newest Visual Basic language specification. The Sixth Edition is updated to Visual Studio 2012 and includes new chapters on Windows 8 UI app development, Windows 8 graphics/multimedia, Windows Phone 8 app development and Windows Azure.Readers begin by getting comfortable with the free Visual Basic Express 2012 IDE and basic VB syntax. Next, they build their skills one step at a time, mastering control structures, classes, objects, methods, variables, arrays, and the core techniques of object-oriented programming. With this strong foundation in place, the Deitels introduce more sophisticated techniques, including inheritance, polymorphism, exception handling, strings, GUI's, data structures, generics, and collections. Throughout, the authors show developers how to make the most of Microsoft's Visual Studio tools. A series of appendices provide essential programming reference material on various topics. Created by world-renowned programming instructors Paul and Harvey Deitel, Visual Basic 2012: How to Program, Sixth Edition introduces all facets of the Visual Basic 2012 language through a hands-on approach with hundreds of working programs. This book has been thoroughly updated to reflect the major innovations Microsoft has incorporated in Visual Basic 2012; all discussions and sample code have been carefully audited against the newest Visual Basic language specification. The Sixth Edition is updated to Visual Studio 2012 and includes new chapters on Windows 8 UI app development, Windows 8 graphics/multimedia, Windows Phone 8 app development and Windows Azure. Readers begin by getting comfortable with the free Visual Basic Express 2012 IDE and basic VB syntax. Next, they build their skills one step at a time, mastering control structures, classes, objects, methods, variables, arrays, and the core techniques of object-oriented programming. With this strong foundation in place, the Deitels introduce more sophisticated techniques, including inheritance, polymorphism, exception handling, strings, GUI's, data structures, generics, and collections. Throughout, the authors show developers how to make the most of Microsoft's Visual Studio tools. A series of appendices provide essential programming reference material on various topics