Beginning Visual Basic 2010
Beginning Visual Basic 2010
Click to enlarge
Author(s): Willis, Thearon
ISBN No.: 9780470502228
Pages: 724
Year: 201003
Format: Trade Paper
Price: $ 62.09
Dispatch delay: Dispatched between 7 to 15 days
Status: Available

Introduction xxix Chapter 1: Welcome to Visual Basic 2010 1 Event-Driven Programming 2 Installing Visual Basic 2010 3 The Visual Studio 2010 IDE 6 The Profile Setup Page 7 The Menu 7 The Toolbars 9 Creating a Simple Application 10 Windows in the Visual Studio 2010 IDE 11 The Toolbox 13 Modified Hungarian Notation 15 The Code Editor 16 Using the Help System 20 Summary 20 Chapter 2: The Microsoft .Net Framework 23 Microsoft''s Reliance on Windows 23 MSN 1.0 24 The .NET Vision 25 This Sounds Like Java 26 Where Now? 27 Writing Software for Windows 27 The .NET Framework Classes 28 Executing Code 29 Common Language Runtime 30 Code Loading and Execution 31 Application Isolation 31 Security 31 Interoperability 32 Exception Handling 32 The Common Type System and Common Language Specification 33 Summary 33 Chapter 3: Writing Software 37 Information and Data 37 Algorithms 38 What is a Programming Language? 39 Working with Variables 39 Comments and Whitespace 42 Comments 42 Whitespace 43 Data Types 44 Working with Numbers 44 Common Integer Math Operations 45 Integer Math Shorthand 47 The Problem with Integer Math 48 Floating-Point Math 49 Other States 51 Single-Precision Floating-Point Numbers 51 Working with Strings 51 Concatenation 53 Using the Concatenation Operator Inline 54 More String Operations 54 Substrings 55 Formatting Strings 56 Localized Formatting 58 Replacing Substrings 58 Using Dates 59 Formatting Date Strings 60 Extracting Date Properties 61 Date Constants 62 Defining Date Literals 63 Manipulating Dates 64 Boolean 65 Storing Variables 65 Binary 66 Bits and Bytes 66 Representing Values 67 Converting Values 68 Methods 70 Why Use Methods? 70 Methods You''ve Already Seen 71 Building a Method 75 Choosing Method Names 77 Scope 78 Summary 80 Chapter 4: Controlling the Flow 83 Making Decisions 83 The If Statement 84 The Else Statement 86 Allowing Multiple Alternatives with ElseIf 86 Nested If Statements 88 Single-Line If Statement 88 Comparison Operators 88 Using Not Equal To 88 Using the Numeric Operators 90 The And and Or Operators 93 Using the And Operator 95 More on And and Or 96 String Comparison 97 Select Case 98 Case-Insensitive Select Case 101 Multiple Selections 104 The Case Else Statement 105 Different Data Types with Select Case 105 Loops 106 The For . Next Loop 106 Using the Step Keyword 108 Looping Backwards 109 The For Each . Next Loop 110 The Do . Loop Loops 111 Do While .


Loop 113 Acceptable Expressions for a Do . Loop 114 Other Versions of the Do . Loop 114 Nested Loops 115 Quitting Early 117 Quitting Do . Loops 118 Infinite Loops 119 Summary 120 Chapter 5: Working With Data Structures 123 Understanding Arrays 123 Defining and Using Arrays 123 Using For Each . Next 126 Passing Arrays As Parameters 128 Sorting Arrays 130 Going Backwards 131 Initializing Arrays with Values 132 Understanding Enumerations 133 Using Enumerations 134 Determining the State 137 Setting Invalid Values 139 Understanding Constants 139 Using Constants 140 Different Constant Types 142 Structures 142 Building Structures 142 Adding Properties to Structures 145 Working with ArrayLists 146 Using an ArrayList 146 Deleting from an ArrayList 149 Showing Items in the ArrayList 152 Working with Collections 153 Creating CustomerCollection 154 Adding an Item Property 155 Building Lookup Tables with Hashtable 157 Using Hashtables 157 Cleaning Up: Remove, RemoveAt, and Clear 160 Case Sensitivity 162 Advanced Array Manipulation 164 Dynamic Arrays 164 Using Preserve 165 Summary 166 Chapter 6: Extensible Application Markup Language (XAML) 169 What is XAML? 170 XAML Syntax 171 Windows Presentation Foundation 174 Creating a Rich WPF User Interface 175 Using WPF Common Controls 180 Wiring Up Events 186 Summary 189 Chapter 7: Building Windows Applications 193 Responding to Events 193 Setting Up a Button Event 194 Building a Simple Application 201 Building the Form 201 Counting Characters 205 Counting Words 207 Creating More Complex Applications 213 The Text Editor Project 213 Creating the Toolbar 214 Creating the Status Bar 218 Creating an Edit Box 220 Clearing the Edit Box 222 Responding to Toolbar Buttons 224 Using Multiple Forms 230 The About Dialog Box 230 Summary 233 Chapter 8: Displaying Dialog Boxes 237 The MessageBox 237 Available Icons for MessageBox 238 Available Buttons for MessageBox 239 Setting the Default Button 239 Miscellaneous Options 239 The Show Method Syntax 240 Example Message Boxes 241 The OpenFileDialog Control 244 The OpenFileDialog Control 245 The Properties of OpenFileDialog 246 OpenFileDialog Methods 247 Using the OpenFileDialog Control 247 The SaveDialog Control 252 The Properties of SaveFileDialog 252 SaveFileDialog Methods 253 Using the SaveFileDialog Control 253 The FontDialog Control 257 The Properties of FontDialog 257 The Methods of FontDialog 257 Using the FontDialog Control 258 The ColorDialog Control 260 The Properties of ColorDialog 261 Using the ColorDialog Control 261 The PrintDialog Control 263 The Properties of PrintDialog 264 Using the PrintDialog Control 264 The PrintDocument Class 264 The Properties of the PrintDocument Class 265 Printing a Document 265 The FolderBrowserDialog Control 271 The Properties of FolderBrowserDialog 272 Using the FolderBrowserDialog Control 272 Summary 275 Chapter 9: Creating Menus 277 Understanding Menu Features 277 Images 278 Access Keys 278 Shortcut Keys 278 Check Marks 278 The Properties Window 279 Creating Menus 280 Designing the Menus 280 Adding Toolbars and Controls 282 Coding Menus 283 Coding the View Menu and Toolbars 287 Testing Your Code 288 Context Menus 290 Creating Context Menus 291 Enabling and Disabling Menu Items and Toolbar Buttons 294 Summary 297 Chapter 10: Debugging and Error Handling 299 Major Error Types 300 Syntax Errors 300 Execution Errors 303 Logic Errors 304 Debugging 305 Creating a Sample Project 305 Setting Breakpoints 321 Debugging Using the Watch Window and QuickWatch Dialog Box 327 Debugging with the Autos Window 330 Debugging with the Locals Window 330 Error Handling 331 Using Structured Error Handling 333 Summary 335 Chapter 11: Building Objects 339 Understanding Objects 339 Encapsulation 341 Methods and Properties 341 Events 341 Visibility 342 What is a Class? 342 Building Classes 343 Reusability 344 Designing an Object 345 State 346 Behavior 346 Storing State 347 Real Properties 349 Read/Write Properties 352 The IsMoving Method 355 Constructors 357 Inheritance 359 Adding New Methods and Properties 360 Adding a GetPowerToWeightRatio Method 363 Changing Defaults 365 Polymorphism: Scary Word, Simple Concept 366 Overriding More Methods 367 Inheriting from the Object Class 369 Objects and Structures 369 The Framework Classes 370 Namespaces 370 The Imports Statement 373 Creating Your Own Namespace 373 Inheritance in the .NET Framework 377 Summary 377 Chapter 12: Advanced Object-Oriented Techniques 381 Building a Favorites Viewer 381 Internet Shortcuts and Favorites 381 Using Classes 384 Scanning Favorites 390 Viewing Favorites 397 An Alternative Favorite Viewer 399 Building a Favorites Tray 399 Displaying Favorites 401 Using Shared Properties and Methods 404 Using Shared Properties 405 Using Shared Methods 408 Understanding Object-Oriented Programming and Memory Management 410 Garbage Collection 411 Releasing Resources 412 Defragmentation and Compaction 413 Summary 414 Chapter 13: Building Class Libraries 417 Understanding Class Libraries 418

To be able to view the table of contents for this publication then please subscribe by clicking the button below...
To be able to view the full description for this publication then please subscribe by clicking the button below...