Visual Basic .NET Programming With Peter Aitken

Coriolis Group, 2002
629 pages, $49.99
ISBN 1-57610-961-5

Aimed at beginning and intermediate level programmers, this book provides a clear and thorough coverage of Microsoft's exciting new Visual Basic .NET development platform. It is written as a combination tutorial and reference, and provides lots of working code and hands-on examples. The included CD-ROM includes all of the book's source code, the Microsoft .NET Software Development Kit, and several useful programmer tools and utilities.

Note: The original publisher of this book, the Coriolis Group, is no longer in business. The book is now being distributed by Paraglyph Press.

View Corrections



  1. Introduction to Visual Basic
  2. Using Visual Studio
  3. Visual Basic Syntax: Fundamentals and Data Storage
  4. Visual Basic Syntax: Program Control and Procedures
  5. Runtime Error and Exception Handling
  6. Visual Basic and the .NET Framework
  7. Creating Windows Applications
  8. Controls for Windows Applications
  9. Object Oriented Programming, Part 1
  10. Object Oriented Programming, Part 2
  11. Creating Custom Controls
  12. Writing Console Applications
  13. Creating MDI Applications
  14. Working With Text and Numbers
  15. Working With Dates and Times
  16. File Access and Management
  17. Graphics and Printing
  18. Processing XML
  19. Database Access with ADO.NET
  20. Creating Web Applications with ASP.NET
  21. Controls for Web Applications
  22. Database Access in Web Applications
  23. Creating and Using Web Services
  24. Developing Customized Web Controls
  25. Debugging and Deploying Your Application

Appendix A: Changes in Visual Basic .NET
Appendix B: The Upgrade Wizard
Appendix C: VB.NET Exceptions
Appendix D: Compiler Options


Page 122

This is not a correction per se but adds some information that I neglected to include in this section of the chapter.

To close a form, use the Me.Close() method. This closes the current form. If this form is the application's only (or last open) form this statement also has the effect of terminating the application. To terminate the entire application regardless of how many forms are open, call Application.Exit().

Page 123:

The code for step 4, the second line should be as follows:

If Not IsNothing(theCaller) Then theCaller.Show()

You could also get the same result as follows:

If Not theCaller Is Nothing Then theCaller.Show()

Page 130:

In the listing the following line of code is wrong:

d = Day(Now)

Replace it with the following line:

d = DateTime.Now.Day

Page 184:

The first sentence on the page is incorrect - it should read "A read-only property is one whose value can be read, but not set, by a program."

Chapter 11

The standard edition of Visual Basic.NET does not provide a project template for a Windows Control Library project. You can still create individual controls from a Windows Application project by selecting Add User Control from the Project menu.

Page 248

The MDI application demo is missing two steps of the instructions. Between steps 4 and 5 add the following step.

Add an OpenFileDialog control and a SaveFileDialog control to the form.

Between steps 6 and 7 add the following:

Add a RichTextBox control to the form. Change its Name property to RTB1 and its Dock property to Fill.

Page 290

In the binary file demonstration program, the following should be included as the second step for creating the program:

2. At the top of the form's code add the following statement:

Imports System.IO

Page 303

The program in which this code runs must include the Imports System.IO statement.

Page 390

Listing 19.1 does not include an Imports statement for the System.Data.SqlClient assembly, nor does it include declarations for the variables sqlCon, sqlAdapter, or ds. It is assumed that these are included in other parts of the program that contains the method in Listing 19.1, as was detailed in code snippets earlier in the chapter.

Page 502 - First Web Service project

In the instructions for creating a web service, it specifies to enter "Adder" in the Name box. This should be changed to specify that in the Location box you edit the default location so it reads "http://localhost/adder.

Also, the book specifies, at the bottom of page 502, that you must enter the namespace declaration into the code. The release version of Visual Studio does this automatically, so you do not have to. Note that the correct namespace is "".

Before navigating to your page, as described at the top of page 504, be sure to save your project.