Details

Beginning Visual Basic 2015


Beginning Visual Basic 2015


1. Aufl.

von: Bryan Newsome

28,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 17.11.2015
ISBN/EAN: 9781119092070
Sprache: englisch
Anzahl Seiten: 624

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<b>Learn Visual Basic step by step and start programming right away</b> <p><i>Beginning Visual Basic 2015</i> is the ideal guide for new programmers, especially those learning their first language. This new edition has been updated to align with Visual Studio 2015, and also refocused to concentrate on key beginner topics. Precise, step-by-step instructions walk you through important tasks, and clear explanations targeted to beginners will have you writing your first Visual Basic application quickly. You'll start from the absolute beginning, assuming no prior programming experience, and then gradually build your skills to write Visual Basic applications for Windows and the Web. Coverage includes objects, class libraries, graphics, databases, and much more, with explicit instructions on using ASP.NET, SQL Server, ADO.NET, and XML. <p>Visual Studio is the usual environment for Visual Basic programming, and the latest upgrade has made Visual Basic more feature compatible with C# to allow programmers to move fluidly between the two languages. Don't know C#? Don't worry! This book starts from the very beginning of Visual Basic programming to help you build your skills from the ground-up. <ul> <li>Understand flow control and data structure</li> <li>Debug Windows applications, dialog boxes, and menus</li> <li>Master objects and object-oriented techniques</li> <li>Access databases, program graphics, and program for the Web</li> </ul> <p>Over three million programmers use Visual Basic, and many of them learned it as their first language. It's beginner-friendly, versatile, and visually oriented, making it an ideal introduction to the programming mindset, workflow, and hard skills. <i>Beginning Visual Basic 2015</i> gets you started on the right foot, with clear, patient instruction and plenty of hands-on practice.
INTRODUCTION xxvii <p><b>CHAPTER 1: WELCOME TO VISUAL BASIC 2015 1</b></p> <p>Implementing Event-Driven Programming 2</p> <p>Installing Visual Basic 2015 3</p> <p>The Visual Studio 2015 IDE 5</p> <p>The Profi le Setup Page 5</p> <p>The Menu 6</p> <p>The Toolbars 8</p> <p>Creating a Simple Application 9</p> <p>Windows in the Visual Studio 2015 IDE 10</p> <p>Modifi ed Hungarian Notation 17</p> <p>The Code Editor 18</p> <p>Using the Help System 22</p> <p>Summary 23</p> <p><b>CHAPTER 2: THE MICROSOFT .NET FRAMEWORK 25</b></p> <p>The .NET Vision 25</p> <p>This Sounds Like Java 26</p> <p>Where Now? 27</p> <p>Writing Software for Windows 27</p> <p>The .NET Framework Classes 28</p> <p>Executing Code 30</p> <p>Common Language Runtime 31</p> <p>Code Loading and Execution 31</p> <p>Application Isolation 31</p> <p>Security 32</p> <p>Interoperability 33</p> <p>Exception Handling 33</p> <p>The Common Type System and Common Language Specification 33</p> <p>Summary 34</p> <p><b>CHAPTER 3: WRITING SOFTWARE 37</b></p> <p>Information and Data 37</p> <p>Algorithms 38</p> <p>What Is a Programming Language? 39</p> <p>Working with Variables 40</p> <p>Comments and Whitespace 43</p> <p>Comments 43</p> <p>Whitespace 45</p> <p>Data Types 45</p> <p>Working with Numbers 45</p> <p>Common Integer Math Operations 46</p> <p>Integer Math Shorthand 49</p> <p>The Problem with Integer Math 50</p> <p>Floating-Point Math 50</p> <p>Working with Strings 53</p> <p>Using Dates 62</p> <p>Boolean 69</p> <p>Storing Variables 69</p> <p>Binary 69</p> <p>Bits and Bytes 70</p> <p>Representing Values 70</p> <p>Converting Values 72</p> <p>Methods 74</p> <p>Why Use Methods? 74</p> <p>Methods You’ve Already Seen 75</p> <p>Building a Method 78</p> <p>Choosing Method Names 81</p> <p>Scope 82</p> <p>Summary 84</p> <p><b>CHAPTER 4: CONTROLLING THE FLOW 87</b></p> <p>Making Decisions 87</p> <p>The If Statement 88</p> <p>The Else Statement 90</p> <p>Allowing Multiple Alternatives with ElseIf 90</p> <p>Nested If Statements 92</p> <p>Single-Line If Statement 92</p> <p>Comparison Operators 92</p> <p>String Comparison 101</p> <p>Select Case 102</p> <p>Case-Insensitive Select Case 106</p> <p>Multiple Selections 108</p> <p>The Case Else Statement 109</p> <p>Different Data Types with Select Case 110</p> <p>Loops 110</p> <p>The For...Next Loop 110</p> <p>The Do...Loop Loops 116</p> <p>Nested Loops 120</p> <p>Quitting Early 121</p> <p>Quitting Do...Loops 123</p> <p>Infinite Loops 124</p> <p>Summary 125</p> <p><b>CHAPTER 5: WORKING WITH DATA STRUCTURES 127</b></p> <p>Understanding Arrays 128</p> <p>Defining and Using Arrays 128</p> <p>Using For Each...Next 131</p> <p>Passing Arrays as Parameters 133</p> <p>Sorting Arrays 136</p> <p>Going Backward 137</p> <p>Initializing Arrays with Values 138</p> <p>Understanding Enumerations 139</p> <p>Using Enumerations 140</p> <p>Determining the State 143</p> <p>Setting Invalid Values 146</p> <p>Understanding Constants 146</p> <p>Using Constants 146</p> <p>Different Constant Types 148</p> <p>Structures 148</p> <p>Building Structures 149</p> <p>Adding Properties to Structures 152</p> <p>Working with ArrayLists 153</p> <p>Using an ArrayList 153</p> <p>Deleting from an ArrayList 158</p> <p>Showing Items in the ArrayList 161</p> <p>Working with Collections 162</p> <p>Creating CustomerCollection 163</p> <p>Adding an Item Property 164</p> <p>Building Lookup Tables with Hashtable 166</p> <p>Using Hashtables 166</p> <p>Cleaning Up: Remove, RemoveAt, and Clear 169</p> <p>Case Sensitivity 172</p> <p>Advanced Array Manipulation 173</p> <p>Dynamic Arrays 173</p> <p>Using Preserve 175</p> <p>Summary 176</p> <p><b>CHAPTER 6: BUILDING WINDOWS APPLICATIONS 179</b></p> <p>Responding to Events 180</p> <p>Counting Characters 184</p> <p>Counting Words 188</p> <p>Creating More Complex Applications 191</p> <p>Creating the Toolbar 192</p> <p>Creating the Status Bar 195</p> <p>Creating an Edit Box 196</p> <p>Clearing the Edit Box 197</p> <p>Responding to Toolbar Buttons 199</p> <p>Using Multiple Forms 202</p> <p>About Dialog 202</p> <p>Summary 206</p> <p><b>CHAPTER 7: DISPLAYING DIALOGS 209</b></p> <p>The MessageBox 210</p> <p>Available Icons for MessageBox 210</p> <p>Available Buttons for MessageBox 211</p> <p>Setting the Default Button 211</p> <p>Miscellaneous Options 212</p> <p>The Show Method Syntax 212</p> <p>Example Message Boxes 214</p> <p>The OpenFileDialog Control 218</p> <p>The OpenFileDialog Control 218</p> <p>The Properties of OpenFileDialog 218</p> <p>OpenFileDialog Methods 220</p> <p>Using the OpenFileDialog Control 221</p> <p>The SaveDialog Control 226</p> <p>The Properties of SaveFileDialog 226</p> <p>SaveFileDialog Methods 227</p> <p>Using the SaveFileDialog Control 227</p> <p>The FontDialog Control 231</p> <p>The Properties of FontDialog 231</p> <p>The Methods of FontDialog 232</p> <p>Using the FontDialog Control 232</p> <p>The ColorDialog Control 235</p> <p>The Properties of ColorDialog 236</p> <p>Using the ColorDialog Control 237</p> <p>The PrintDialog Control 238</p> <p>The Properties of PrintDialog 239</p> <p>Using the PrintDialog Control 240</p> <p>The PrintDocument Class 240</p> <p>The Properties of the PrintDocument Class 240</p> <p>Printing a Document 241</p> <p>The FolderBrowserDialog Control 248</p> <p>The Properties of FolderBrowserDialog 248</p> <p>Using the FolderBrowserDialog Control 249</p> <p>Summary 252</p> <p><b>CHAPTER 8: CREATING MENUS 255</b></p> <p>Understanding Menu Features 255</p> <p>Images 256</p> <p>Access Keys 256</p> <p>Shortcut Keys 256</p> <p>Check Marks 256</p> <p>The Properties Window 257</p> <p>Creating Menus 259</p> <p>Designing the Menus 259</p> <p>Adding Toolbars and Controls 261</p> <p>Coding Menus 263</p> <p>Coding the View Menu and Toolbars 267</p> <p>Testing Your Code 269</p> <p>Context Menus 272</p> <p>Creating Context Menus 272</p> <p>Enabling and Disabling Menu Items and Toolbar Buttons 275</p> <p>Summary 279</p> <p><b>CHAPTER 9: DEBUGGING AND ERROR HANDLING 283</b></p> <p>Major Error Types 284</p> <p>Syntax Errors 284</p> <p>Execution Errors 288</p> <p>Logic Errors 288</p> <p>Debugging 289</p> <p>Creating a Sample Project 289</p> <p>Setting Breakpoints 306</p> <p>Debugging Using the Watch Window and QuickWatch Dialog Box 313</p> <p>Debugging with the Autos Window 316</p> <p>Debugging with the Locals Window 316</p> <p>Error Handling 318</p> <p>Using Structured Error Handling 319</p> <p>Summary 321</p> <p><b>CHAPTER 10: BUILDING OBJECTS 325</b></p> <p>Understanding Objects 326</p> <p>Encapsulation 327</p> <p>Methods and Properties 327</p> <p>Events 328</p> <p>Visibility 328</p> <p>What Is a Class? 329</p> <p>Building Classes 330</p> <p>Reusability 330</p> <p>Designing an Object 332</p> <p>State 332</p> <p>Behavior 333</p> <p>Storing State 333</p> <p>Real Properties 336</p> <p>Read/Write Properties 339</p> <p>Auto-Implemented Properties 342</p> <p>The IsMoving Method 343</p> <p>Constructors 345</p> <p>Inheritance 346</p> <p>Adding New Methods and Properties 348</p> <p>Adding a GetPowerToWeightRatio Method 350</p> <p>Changing Defaults 352</p> <p>Polymorphism: Scary Word, Simple Concept 354</p> <p>Overriding More Methods 354</p> <p>Inheriting from the Object Class 356</p> <p>Objects and Structures 357</p> <p>The Framework Classes 357</p> <p>Namespaces 358</p> <p>The Imports Statement 360</p> <p>Creating Your Own Namespace 361</p> <p>Inheritance in the .NET Framework 364</p> <p>Summary 365</p> <p><b>CHAPTER 11: ADVANCED OBJECT-ORIENTED TECHNIQUES 367</b></p> <p>Building a Favorites Viewer 368</p> <p>Internet Shortcuts and Favorites 368</p> <p>Using Classes 371</p> <p>Scanning Favorites 377</p> <p>Viewing Favorites 384</p> <p>An Alternative Favorite Viewer 386</p> <p>Building a Favorites Tray 387</p> <p>Displaying Favorites 388</p> <p>Using Shared Properties and Methods 392</p> <p>Using Shared Properties 392</p> <p>Using Shared Methods 397</p> <p>Understanding Object-Oriented Programming and Memory Management 398</p> <p>Garbage Collection 400</p> <p>Releasing Resources 400</p> <p>Defragmentation and Compaction 401</p> <p>Summary 402</p> <p><b>CHAPTER 12: ACCESSING DATA USING STRUCTURED QUERY LANGUAGE 405</b></p> <p>What You Need to Complete This Chapter’s Exercises 406</p> <p>What Is a Database? 407</p> <p>Database Tables 407</p> <p>Primary and Foreign Keys 413</p> <p>Queries 415</p> <p>Understanding Basic SQL Syntax 415</p> <p>Using SELECT Statement 416</p> <p>Using the JOIN Statement 417</p> <p>Using the UPDATE Statement 419</p> <p>Using the DELETE Statement 419</p> <p>Using the INSERT Statement 420</p> <p>Using the SQL Comment 421</p> <p>Executing Queries in SQL Server 421</p> <p>Summary 425</p> <p><b>CHAPTER 13: DATABASE PROGRAMMING WITH SQL SERVER AND ADO.NET 427</b></p> <p>ADO.NET 428</p> <p>ADO.NET Data Namespaces 428</p> <p>The SqlConnection Class 429</p> <p>Working with the Connection String Parameters 430</p> <p>Opening and Closing the Connection 431</p> <p>The SqlCommand Class 431</p> <p>The SqlDataAdapter Class 434</p> <p>The DataSet Class 438</p> <p>DataView 438</p> <p>The ADO.NET Classes in Action 440</p> <p>Data Binding 450</p> <p>BindingContext and CurrencyManager 450</p> <p>Binding Controls 451</p> <p>Binding Examples 452</p> <p>Summary 480</p> <p><b>CHAPTER 14: ASP.NET 483</b></p> <p>Thin?]Client Architecture 484</p> <p>Web Forms versus Windows Forms 485</p> <p>Windows Forms Advantages 485</p> <p>Web Forms Advantages 485</p> <p>Web Applications: The Basic Pieces 486</p> <p>Web Servers 486</p> <p>Browsers 486</p> <p>HyperText Markup Language 487</p> <p>JavaScript 487</p> <p>Cascading Style Sheets 487</p> <p>Active Server Pages 488</p> <p>Benefits of ASP.NET Web Pages 488</p> <p>Special Website Files 488</p> <p>Development 489</p> <p>Controls: The Toolbox 489</p> <p>Building Websites 490</p> <p>Creating a Web Form for Client?] and Server?]Side Processing 490</p> <p>Website Locations with VS 2015 495</p> <p>Performing Data Entry and Validation 498</p> <p>Using the GridView to Build a Data?]Driven Web Form 507</p> <p>Summary 512</p> <p><b>CHAPTER 15: DEPLOYING YOUR APPLICATION 515</b></p> <p>What Is Deployment? 516</p> <p>ClickOnce Deployment 516</p> <p>XCOPY Deployment 521</p> <p>Visual Studio 2015 Setup Application Options 522</p> <p>Deploying Different Solutions 522</p> <p>Private Assemblies 523</p> <p>Shared Assemblies 523</p> <p>Deploying Desktop Applications 524</p> <p>Deploying Web Applications 524</p> <p>Deploying XML Web Services 524</p> <p>Useful Tools 525</p> <p>Summary 525</p> <p><b>CHAPTER 16: WINDOWS 8 APPS 529</b></p> <p>Windows 8 Application Design Principles 530</p> <p>Using Touch 530</p> <p>Application Commands 531</p> <p>Windows 8 Controls 532</p> <p>Coding Windows 8 Apps with XAML 533</p> <p>Creating Your First Windows 8 App 534</p> <p>Application Layout 548</p> <p>Application Views 548</p> <p>Screen Sizes and Orientation 548</p> <p>Summary 553</p> <p>APPENDIX: EXERCISE SOLUTIONS 557</p> <p>INDEX 569</p>
<p><b>About the author</b> <p><b>Bryan Newsome</b> is a senior programmer/analyst and a Microsoft Certified Application Developer for VB.NET. Since starting his career with Visual Basic 5, he has embraced each new version and now creates all new applications leveraging the .NET platform and VB.NET. Bryan has built a reputation around providing solutions and mentoring on leading-edge Microsoft technologies. <p>Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world.
<p><b>The step-by-step, beginner guide to Visual Studio 2015 </b> <p>Visual Basic is an ideal beginner's language because it's versatile, visual, and easy-to-use. This book is designed specifically for new programmers, with clear explanations and step-by-step instruction to help beginners start programming quickly, and comprehensive coverage of Visual Studio's latest features to help streamline the workflow. Start with the fundamentals to build the critical programming skill set, or dip in and out as needed to find quick guidance on ASP.NET, SQL Server, ADO.NET, and XML. This patient guide assumes no prior experience, providing detailed explanations and plenty of hands-on practice. <p><i>Beginning Visual Basic 2015:</i> <ul> <li> Walks through the Visual Basic installation, tools, and interface to create a simple application</li> <li> Explains the .NET framework and the fundamentals of writing software for Windows<sup>®</sup> or the web</li> <li> Provides expert tips for working with data structures, dialogs, menus, and more</li> <li> Shows how to access data and program databases using SQL Server<sup>®</sup> and ADO.NET</li> <li> Leads step-by-step through web application and website development using ASP.NET</li> <li> Demonstrates a variety of methods for debugging and handling the different types of errors</li> </ul> <p><b>Wrox Beginning guides</b> are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €