What's New
Q & A
Tip Jar
C# Helper...
Follow VBHelper on Twitter
MSDN Visual Basic Community
  Visual Basic 2005 with .NET 3.0 Programmer's Reference: Table of Contents  
Overview Table of Contents Source Code
Updates Wrox Forum Info at Wiley.com
Snippets All Editions

IMPORTANT: This page contains information about the second edition of this book: Visual Basic 2005 with .NET 3.0 Programmer's Reference. Go to the latest edition.

Part I: Getting Started

The chapters in this part of the book explain the basics of Visual Basic .NET programming. They describe the development environment, basic program syntax, and how to interact with standard controls. More advanced topics include how to build custom controls and how to implement drag and drop.
1. IDE
Describes the integrated development environment (IDE). It explains the IDE's windows and how to customize the IDE. It also explains tools that provide help while you're programming such features as the Object Browser and the code window's Intellisense.
2. Controls in General
Describes general Windows Forms control concepts. It explains how to add controls to a form, how to read and change a control's properties at design time and at run-time, and how to use some of the more complicated control properties (such as Dock and Anchor). This chapter shows how to catch and respond to events, and how to change event handlers in code.
3. Program and Module Structure
Analyzes a simple Visual Basic program and explains the structure created by Visual Studio. It describes the program's code regions and comments, and tells how you can use similar techniques to make your code more readable and manageable.
4. Data Types, Variables, and Constants
Explains the standard data types provided by Visual Basic. It shows how to declare and initialize variables and constants, and explains variable scope. It discusses value and reference types, passing parameters by value or reference, and creating parameter variables on the fly. It also explains how to create arrays, enumerated types, and structures.
5. Operators
Describes the operators a program uses to perform calculations. These include mathematical operators (+, *, \), string operators (&), and Boolean operators (And, Or). The chapter explains operator precedence and type conversion issues that arise when an expression combines more than one type of operator (for example, arithmetic and Boolean).
6. Subroutines and Functions
Explains how you can use subroutines and functions to break a program into manageable pieces. It describes routine overloading and scope.
7. Program Control Statements
Describes the statements that a Visual Basic program uses to control code execution. These include decision statements (If Then Else, Select Case, IIF, Choose) and looping statements (For Next, For Each, Do While, While Do, Repeat Until).
8. Error Handling
Explains error handling and debugging techniques. It describes the Try Catch structured error handler, in addition to the older On Error statement inherited from earlier versions of Visual Basic. It discusses typical actions a program might take when it catches an error. It also describes techniques for preventing errors and making errors more obvious when they do occur.
9. Introduction to Windows Forms Controls
Explains the Visual Basic's standard controls that you can use on Windows forms. It describes the most useful properties, methods, and events provided by these controls, and it gives examples showing how to use them. It also describes cases where these controls rely on each other. For example, several controls such as the ToolBar obtain images from an associated ImageList control. Note that Windows Forms controls described in this chapter are different from the newer controls introduced by WPF and described in Chapter 26, "Windows Presentation Foundation (WPF)."
10. Forms
Explains typical uses of forms. It tells how to build partially transparent forms for use as splash, login, and About forms. It describes form cursors and icons, how to override WndProc to intercept a form's Windows messages, how to make a Multiple Document Interface (MDI) application, and how to implement a Most Recently Used (MRU) file list. It does not cover all of the Form object's properties, methods, and events in detail; those are described in Appendix J, "Form Objects."
11. Database Controls and Objects
Explains how to use Visual Basic's standard database controls. These include database connection components that handle connections to a database, DataSet components that hold data within an application, and data adapter controls that move data between data connections and DataSets.
12. Custom Controls
Explains how to build your own customized controls that you can then use in other applications. It covers the three main methods for creating a custom control: derivation, composition, and building from scratch. This chapter also provides several examples that you can use as a starting point for controls of your own.
13. Drag and Drop, and the Clipboard
Explains how a Visual Basic program can support drag-and-drop operations. It tells how your program can start a drag to another application, how to respond to drag operations started by another application, and how to receive a drop from another application. This chapter also explains how a program can copy data to and from the clipboard. Using the clipboard is similar to certain types of drag-and-drop operations, so these topics fit naturally in one chapter.
14. UAC Security
Describes the new User Access security model used by the Vista operating system. With UAC security, all users run with reduced "normal" user privileges. If a program must perform tasks requiring administrator permissions, a UAC dialog allows you to elevate the application's privilege level. This chapter describes UAC security and explains how you can mark a program for privilege elevation.

Part II: Object-Oriented Programming

The chapters in this part of the book explain fundamental concepts in object-oriented programming (OOP) with Visual Basic. It also describes some of the more important classes and objects that you can use when building an application.
15. OOP Concepts
Explains the fundamental ideas behind object-oriented programming (OOP). It describes the three main features of OOP: encapsulation, polymorphism, and inheritance. It explains the benefits of these features, and tells how you can take advantage of them in Visual Basic.
16. Classes and Structures
Explains how to declare and use classes and structures. It explains what classes and structures are, and it describes their differences. It shows the basic declaration syntax and tells how to create instances of classes and structures. It also explains some of the trickier class issues (such as private class scope, declaring events, and shared variables and methods).
17. Namespaces
Explains namespaces. It tells how Visual Studio uses namespaces to categorize code and to prevent name collisions. It describes a project's root namespace, tells how Visual Basic uses namespaces to resolve names (such as function and class names), and tells how you can add namespaces to an application yourself.
18. Collection Classes
Explains classes included in Visual Studio that you can use to hold groups of objects. It describes the various collection, dictionary, queue, and stack classes; tells how to make strongly typed versions of those classes; and gives some guidance on deciding which class to use under different circumstances.
19. Generics
Explains templates that you can use to build new classes designed to work with specific data types. For example, you can build a generic binary tree, and then later use it to build classes to represent binary trees of customer orders, employees, or work items.

Part III: Graphics

The chapters in this part of the book describe graphics in Visual Basic .NET. They explain the Graphics Device Interface+ (GDI+) routines that programs use to draw images in Visual Basic. They explain how to draw lines and text; how to draw and fill circles and other shapes; and how to load, manipulate, and save bitmap images. This part also explains how to generate printed output and how to send reports to the screen or to the printer.
20. Drawing Basics
Explains the fundamentals of drawing graphics in Visual Basic .NET. It describes the graphics namespaces and the classes they contain. It describes the most important of these classes, Graphics, in detail. It also describes the Paint event handler and other events that a program should use to keep its graphics up to date.
21. Brushes, Pens, and Paths
Explains the most important graphics classes after Graphics: Pen and Brush. It tells how you can use Pens to draw solid lines, dashed lines, lines with custom dash patterns, and lines with custom lengthwise stripe patterns. It tells how to use Brushes to fill areas with colors, hatch patterns, linear color gradients, color gradients that follow a path, and tiled images. This chapter also describes the GraphicsPath class, which represents a series of lines, shapes, curves, and text.
22. Text
Explains how to draw strings of text. It shows how to create different kinds of fonts, determine exactly how big text will be when drawn in a particular font, and use GDI+ functions to make positioning text simple. It shows how to use a StringFormat object to determine how text is aligned, wrapped, and trimmed, and how to read and define tab stops.
23. Image Processing
Explains how to load, modify, and save image files. It shows how to read and write the pixels in an image, and how to save the result in different file formats such as BMP, GIF, and JPEG. It tells how to use images to provide auto-redraw features, and how to manipulate an image pixel by pixel, both using a Bitmap's GetPixel and SetPixel methods and using "unsafe" access techniques that make pixel manipulation much faster than is possible with normal GDI+ methods.
24. Printing
Explains different ways that a program can send output to the printer. It shows how you can use the PrintDocument object to generate printout data. You can then use the PrintDocument to print the data immediately, use a PrintDialog control to let the user select the printer and set its characteristics, or use a PrintPreviewDialog control to let the user preview the results before printing.
25. Reporting
Provides an introduction to Crystal Reports, a tool that makes generating reports in Visual Basic relatively easy. The chapter explains the basics of Crystal Reports and steps through an example that builds a simple report.
26. Windows Presentation Foundation (WPF)
Describes one of the biggest innovations provided by version 3.0 of the .NET Framework. WPF includes a completely new set of controls that provide remarkable new features. This chapter describes some of these controls and explains how you can define an interface by using the extensible application markup language (XAML - pronounced "zammel") that allows you to define a user interface. It also shows how you can use XAML to define complex appearances and behaviors for these new controls.

Part IV: Interacting with the Environment

The chapters in this part of the book explain how an application can interact with its environment. They show how the program can save and load data in external sources (such as the System Registry, resource files, and text files); work with the computer's screen, keyboard, and mouse; and interact with the user through standard dialog controls.
27. Configuration and Resources
Describes some of the ways that a Visual Basic program can store configuration and resource values for use at run-time. Some of the most useful of these include environment variables, the Registry, configuration files, and resource files.
28. Streams
Explains the classes that a Visual Basic application can use to work with stream data. Some of these classes are FileStream, MemoryStream, BufferedStream, TextReader, and TextWriter.
29. File-System Objects
Describes classes that let a Visual Basic application interact with the file system. These include classes such as Directory, DirectoryInfo, File, and FileInfo that make it easy to create, examine, move, rename, and delete directories and files.
30. Windows Workflow Foundation (WF)
Describes one of the major new tools provided by the .NET Framework 3.0. WF includes a workflow run-time engine and an assortment of classes for representing workflows. This chapter explains how you can define a workflow by using objects, and then let the run-time engine move a job through the flow until it reaches an end state.
31. Windows Communication Foundation (WCF)
Describes another of the new tools included in the .NET Framework 3.0. WCF is a library and set of tools that make building service-oriented applications easier. This chapter explains how to use new WF attributes to easily define a service, how to use configuration files to configure the service, and how to use WF tools to consume the service.
32. Useful Namespaces
Describes some of the most commonly useful namespaces defined by the .NET Framework. It provides a brief overview of some of the most important System namespaces and gives more detailed examples that demonstrate regular expressions, XML, cryptography, reflection, threading, and Direct3D.


The book's appendices provide a categorized reference of the Visual Basic .NET language. You can use them to quickly review the syntax of a particular command, select from among several overloaded versions of a routine, or refresh your memory of what a particular class can do. The chapters earlier in the book give more context, explaining how to perform specific tasks and why one approach might be preferred over another.
A. Useful Control Properties, Methods, and Events
Describes properties, methods, and events that are useful with many different kinds of controls.
B. Variable Declarations and Data Types
Summarizes the syntax for declaring variables. It also gives the sizes and ranges of allowed values for the fundamental data types.
C. Operators
Summarizes the standard operators such as +, <<, OrElse, and Like. It also gives the syntax for operator overloading.
D. Subroutine and Function Declarations
Summarizes the syntax for subroutine, function, and property procedure declarations.
E. Control Statements
Summarizes statements that control program flow, such as If Then, Select Case, and looping statements.
F. Error Handling
Summarizes both structured and "classic" error handling. It describes some useful exception classes and gives an example showing how to build a custom exception class.
G. Standard Controls and Components
Describes standard Windows Forms controls and components provided by Visual Basic .NET. It explains the properties, methods, and events that I have found most useful when working with these components.
H. WPF Controls
Describes the controls that are placed in the toolbox by default when you build WPF applications. This is a relatively brief list to give you a feel for the kinds of controls that are available, rather than an in-depth description like the one provided for the standard Windows Forms controls in Appendix G.
I. Visual Basic Power Packs
Briefly lists some additional tools that you can download to make Visual Basic development easier. This appendix describes some Visual Basic 6 compatibility tools provided by Microsoft, and some controls built in Visual Basic 2003 that are available on the GotDotNet Web site.
J. Form Objects
Describes forms. In a very real sense, forms are just another type of component. They play such a key role in Visual Basic applications, however, that they deserve special attention in their own appendix.
K. Classes and Structures
Summarizes the syntax for declaring classes and structures, and defining their constructors and events.
L. Generics
Summarizes the syntax for declaring generic classes.
M. Graphics
Summarizes the objects used to generate graphics in Visual Basic .NET. It covers the most useful graphics namespaces.
N. Useful Exception Classes
Lists some of the more useful exception classes defined by Visual Basic. You may want to throw these exceptions in your own code.
O. Date and Time Format Specifiers
Summarizes specifier characters that you can use to format dates and times. For example, they let you display a time using a 12-hour or 24-hour clock.
P. Other Format Specifiers
Summarizes formatting for numbers and enumerated types.
Q. The Application Class
Summarizes the Application class that provides properties and methods for controlling the current application.
R. The My Namespace
Describes the My namespace, which provides shortcuts to useful features scattered around other parts of the .NET Framework. It provides shortcuts for working with the application, computer hardware, application forms, resources, and the current user.
S. Streams
Summarizes Visual Basic's stream classes such as Stream, FileStream, MemoryStream, TextReader, CryptoStream, and so forth.
T. File-System Classes
Summarizes methods that an application can use to learn about and manipulate the file system. It explains classic Visual Basic methods such as FreeFile, WriteLine, and ChDir, as well as newer .NET Framework classes such as FileSystem, Directory, and File.


  Visual Basic 2005 with .NET 3.0 Programmer's Reference: Table of Contents  
Overview Table of Contents Source Code
Updates Wrox Forum Info at Wiley.com
Snippets All Editions

Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.