Book description
Your expert guide to building modern applications with Visual Basic 2010
Take control of Visual Basic 2010—for everything from basic Windows and web development to advanced multithreaded applications. Written by Visual Basic experts, this handbook provides an in-depth reference on language concepts and features, as well as scenario-based guidance for putting Visual Basic to work. It's ideal whether you’re creating new applications with Visual Basic 2010 or upgrading projects built with an earlier version of the language.
Discover how to:
Use Visual Basic 2010 for Windows Forms and Windows Presentation Foundation projects
Build robust code using object-oriented programming techniques, such as classes and types
Work with events and delegates—and add your own events to custom classes
Program arrays, collections, and other data structures in the Microsoft .NET Framework
Solve problems quickly and easily using My namespace in Visual Basic
Dive into Microsoft LINQ, including LINQ to XML and LINQ to Entities
Tackle threading, multitasking, and multiprocessor development and debugging
Table of contents
- Microsoft® Visual Basic® 2010 Developer’s Handbook
- Dedication
- Foreword
- Introduction
-
I. Beginning with Language and Tools
-
1. Beginners All-Purpose Symbolic Instruction Code
- Starting Visual Studio for the First Time
- Console Applications
- Anatomy of a (Visual Basic) Program
- Starting Up with the Main Method
- Methods with and Without Return Values
- Declaring Variables
- Expressions and Definitions of Variables
- Comparing Objects and Data Types
- Properties
- Type Literal for Determining Constant Types
- Type Safety
- Arrays and Collections
- Executing Program Code Conditionally
- Loops
- Simplified Access to Object Properties and Methods Using With ... End With
- The Scope of Variables
- The += and –= Operators and Their Relatives
- Error Handling in Code
- 2. Introduction to the .NET Framework
-
3. Sightseeing
- Introduction
- Starting Visual Studio for the First Time: Selecting the Profile
- The Start Page: Where Your Developing Endeavors Begin
- Upgrading Visual Basic 6.0 Applications to Visual Studio 2010
- The History of Multitargeting
- Interesting Read for Multitargeting
- Zooming In the New and Improved WPF-Based IDE
- Searching, Understanding, and Navigating Code
- Regions and Outlining
- Architecture Explorer
- The Generate From Usage Feature
- Extending Visual Studio
-
4. Introduction to Windows Forms—Designers and Code Editor by Example
- Case Example: the DVD Cover Generator
-
Designing Forms with the Windows Forms Designer
- Positioning Controls
- Performing Common Tasks on Controls by Using Smart Tags
-
Dynamically Arranging Controls at Runtime
- Anchoring Controls with the Anchor Property
- Adjusting Controls Proportionately to Form Size Changes with TableLayoutPanel
- Creating Columns and Rows for the TableLayoutPanel
- Arranging Controls in the Cells of the TableLayoutPanel
- Anchoring Controls in the TableLayoutPanel
- Spanning Rows or Columns of the TableLayoutPanel
- Automatic Scrolling of Controls in Containers
- Selecting Controls That Users Can’t Reach with the Mouse
- Determining the Tab Order of Controls
- Using the Name, Text, and Caption Properties
- Setting up Accept and Cancel Buttons for a Form
- Adding Multiple Forms to a Project
- What’s Next?
- Naming Conventions for Controls in this Book
- Functions for Control Layout in the Designer
- Keyboard Shortcuts for Positioning Controls
-
The Code Editor
- Setting the Editor Display to the Correct Size
- Many Roads Lead to the Code Editor
- IntelliSense—The Strongest Workhorse in the Coding Stable
- Automatic Completion of Structure Keywords and Code Indentation
- Error Detection in the Code Editor
- XML Documentation Comments for IntelliSense for Customized Objects and Classes
- Adding New Code Files to the Project
- Refactoring Code
- Code Snippets Library
- Saving Application Settings with the Settings Designer
- Congratulations!
-
5. Introduction to Windows Presentation Foundation
- What Is the Windows Presentation Foundation?
- What’s So New About WPF?
- How WPF Brings Designers and Developers Together
- Extensible Application Markup Language
- XAML Syntax Overview
-
ImageResizer—a Practical WPF Example
- Defining Grid Columns and Rows for Arranging Controls
- Inserting a New Row Retroactively
- The Main Menu
- Binding Events to Controls
- Loading the Default Settings
- Organization Is Everything: Making the Output Path Freely Definable
- Making Final Preparations: Adding Pictures
- On to the Finish Line: Reducing Picture Size
- Adding a Project to an Existing Solution and Setting References
- The Heart of the Program: Image Resizing
- From Coach to Business Class
-
6. The Essential .NET Data Types
- Numeric Data Types
- The Char Data Type
-
The String Data Type
- Strings—Yesterday and Today
- Declaring and Defining Strings
- Handling Empty and Blank Strings
- Automatic String Construction
- Assigning Special Characters to a String
- Memory Requirements for Strings
- No Strings Attached, or Are There? Strings are Immutable!
- Iterating through Strings
- StringBuilder vs. String: When Performance Matters
- Performance Comparison: String vs. StringBuilder
- The Boolean Data Type
- The Date Data Type
- .NET Equivalents of Base Data Types
- Constants and Read-Only Fields (Read-Only Members)
-
1. Beginners All-Purpose Symbolic Instruction Code
-
II. Object-Oriented Programming
- 7. A Brief Introduction to Object-Oriented Programming
- 8. Class Begins
- 9. First Class Programming
- 10. Class Inheritance and Polymorphism
- 11. Developing Value Types
- 12. Typecasting and Boxing Value Types
- 13. Dispose, Finalize, and the Garbage Collector
-
14. Operators for Custom Types
- Introduction to Operator Procedures
- Preparing a Structure or Class for Operator Procedures
- Implementing Operators
- Implementing Comparison Operators
- Implementing Type Conversion Operators for Use with CType
- Implementing True and False Evaluation Operators
- Problem Handling for Operator Procedures
- Implementable Operators: an Overview
- 15. Events, Delegates, and Lambda Expressions
- 16. Enumerations
- 17. Developing with Generics
- 18. Advanced Types
-
III. Programming with .NET Framework Data Structures
-
19. Arrays and Collections
- Array Basics
-
Initializing Arrays
- Changing Array Dimensions at Runtime
- The Magic of ReDim
- Pre-Allocating Values of Array Elements in Code
- Type Inference When Using Array Initializers
- Multidimensional Arrays and Jagged Arrays
- Jagged Arrays
- Important Array Properties and Methods
- Implementing Sort and BinarySearch Custom Classes
- Using Lambdas with Array Methods
- Enumerators
- Collection Basics
- Initializing Collections
-
Important Collections of .NET Framework
- ArrayList: Universal Storage for Objects
- Type-Safe Collections Based on CollectionBase
- Hashtables: Fast Lookup for Objects
- Using Hashtables
- Using Custom Classes as Key
- Enumerating Data Elements in a Hashtable
- The DictionaryBase Class
- Queue: the FIFO Principle
- Stack: the LIFO Principle
- SortedList: Keeping Elements Permanently Sorted
- Generic Collections
- 20. Serialization
- 21. Attributes and Reflection
-
19. Arrays and Collections
-
IV. Development Simplifications in Visual Basic 2010
-
22. Using My as a Shortcut to Common Framework Functions
- Visual Basic 2010 Simplifications Using the Example of the DotNetCopy Backup Tool
- The Principle Functionality of DotNetCopy
- The My Namespace
- Calling Forms Without Instantiation
- Reading Command-Line Arguments with My.Application.CommandLineArgs
- Targeted Access to Resources with My.Resources
- Writing Localizable Applications with Resource Files and the My Namespace
- Simplified File Operations with My.Computer.FileSystem
- Using Application Settings with My.Settings
-
23. The Application Framework
-
Application Framework Options
- A Windows XP Look and Feel for Your Applications—Enabling Visual XP Styles
- Preventing Multiple Application Starts—Creating a Single Instance Application
- Save My.Settings Automatically on Shutdown
- Specifying the User Authentication Mode
- Specifying the End of Your Application—the Shutdown Mode
- Displaying a Splash Dialog when Starting Complex Applications—Start Screen
- Adding a Code File to Handle Application Events (Start, End, Network Status, Global Exceptions)
-
Application Framework Options
-
22. Using My as a Shortcut to Common Framework Functions
-
V. Language-Integrated Query—LINQ
- 24. Introduction to LINQ (Language-Integrated Query)
- 25. LINQ to Objects
- 26. LINQ to XML
-
27. LINQ to Entities: Programming with Entity Framework
- Prerequisites for Testing the Examples
- LINQ to Entities: the First Practical Example
- Querying an Entity Model
- Modifying, Saving, and Deleting Data
- Updating a Data Model from a Database
- Model-First Design
- Inheritance in the Conceptual Data Model
- Executing T-SQL Commands Directly in the Object Context
- Working with Stored Procedures
- Looking Ahead
- VI. Parallelizing Applications
- A.
- Index
- About the Authors
- Copyright
Product information
- Title: Microsoft® Visual Basic® 2010 Developer’s Handbook
- Author(s):
- Release date: August 2011
- Publisher(s): Microsoft Press
- ISBN: 9780735663138
You might also like
book
Mastering Microsoft® Visual Basic® 2010
The new edition of the ultimate comprehensive guide to Microsoft Visual Basic Where most VB books …
book
Beginning Microsoft® Visual Basic® 2008
Beginning Microsoft Visual Basic 2008 is designed to teach you how to write useful programs in …
book
Microsoft® Offic Excel® 2007 Visual Basic® for Applications Step by Step
Quickly teach yourself how to automate tasks and create custom spreadsheet solutions with Excel 2007 Visual …
book
101 Microsoft® Visual Basic® .NET Applications
Flattens the learning curve for Visual Basic .NET by providing working applications with complete code, helpful …