Wiley.com
Print this page Share

Beginning Visual Basic 2005

ISBN: 978-0-7645-7401-6
Paperback
840 pages
November 2005
Beginning Visual Basic 2005 (0764574019) cover image
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
Default behavior of the DialogResult enumeration
The RTM version of Visual Studio 2005 changed the default behavior of the DialogResult enumeration.

In the book and in the downloaded code you will find examples such as DialogResult.OK. These dialog result enumerations must be fully qualified with the Windows.Forms namespace.

For example, DialogResult.OK should be written as Windows.Forms.DialogResult.OK. This applies to all DialogResult enumerations.
3/16/06
Database Explorer should be Server Explorer
Throughout the book, any references to Database Explorer should be Server Explorer.
1/9/06
14 Error in Text
Try It Out, Step 1, line 2 reads:
'click the _ button in the top-right...'

It should read:
'click the X button in the top-right...'
06/05/2006
47 Error in Text
under heading "Integer Math Shorthand" --

"In the next Try It Out, you'll see how can perform"

should be:

"In the next Try It Out, you'll see how you can perform"
OR
"In the next Try It Out, you'll see how to perform"
01/28/2008
59 Error in Text
In "Try It Out" Item 2:

'Replace the string occurance

should be:

'Replace the string occurrence
01/25/2008
60 Error in Code
example code for the "Displaying the Current Date" Try It Out: the last line to input:
MessageBox.Show(dteData, "Data Demo").

This fails to build if Option Strict is On. If Option Strict is Off, it builds and runs.

NOTE
If you already have Visual Studio 2005 installed and running,if you try to run some of these tutorials with it on, you will get build errors.

TO FIX
Add: ".ToString" to the variable name, rendering...
MessageBox.Show(dteData.ToString, "Data Demo").
03/30/07
67 Typo
the first sentence in the last paragraph:
with base twp

should be:
with base two
01/08/07
76 Error in Text
Second paragraph third sentence --

"you change it in once place"

should be:

"you change it in one place"
02/05/2008
76 & 77 Error in Code
Last line should be MessageBox.Show(dblArea.ToString, "Area").
12/05/2007
120 Error in Text
How it Works, Second Paragraph

m (from "the 1 to 3 loop, which results in m being incremented.")
should be:
intLoop2 (becoming "the 1 to 3 loop, which results in intLoop2 being incremented.")
07/03/07
120 Error in Text
Second paragraph, second sentence under How It Works:

which results in m being incremented

should be:

which results in intLoop2 being incremented.
02/11/2008
134 Error in Code
For intIndex as Integer ....
Code reads:
lstFriends.Items.Add(StrFriends(0))

Should read:
lstFriends.Items.Add(StrFriends(intIndex))
05/17/2006
140 Error in Code
Visual Basic 2005. 'Try it Out' at bottom of page lists:
If value >= 6 and value < 7 then
CurrentState =
DayAction.TravelingToWork

Should read:
If value >= 6 and value < 7 then
CurrentState =
DayAction.GetingReadyForWork
03/31/2006
218 Step 8 Code Snippet
step 8, inserting code snippets.

There was a change between the last beta and the RTM So, when you go to "File System - Processing Drives, Folders, and Files" and then double click the "Read text from a file" different code will be inserted.

The following is the code inserted inside the "if statement"....

If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK
Then
Dim fileContents As String
fileContents = My.Computer.FileSystem.ReadAllText("C:\Test.txt")
End If"
3/23/06
218 Error in Code
For step 9:

Modify the code as shown:

If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
'Save the file name
strFileName = OpenFileDialog1.FileName
'Read the contents of the file
Dim fileContents As String
fileContents = My.Computer.FileSystem.ReadAllText(strFileName
'Display the file contents in the TextBox
txtFile.Text = fileContents
End If
03/12/2008
149 Error in Text
Try It Out, Item 1, Beginning Sentence:

Wrong type face for Name. It should be in the same type face as the sentence not in the type face of the code.
02/11/2008
222 Error in File Name
Step 5:
the code that isinserted is: My.Computer.FileSystem.WriteAllText("C:\Test.txt","Text", True)
there is no Write New Text Files
should be:
a Write Text to a File.
08/23/06
235 Text Deletions
Printing using the PrintDocument class requires a lot of coding and knowledge of how actual printing works. Fortunately, the .NET Framework provides the My.Computer.Printers namespace, which simplifies your job as a developer.

This namespace wraps up all the complexities of printing and provides you with methods and properties that allow you to print a text document with ease and just a few lines of code. You can use the DefaultPrinter method of this namespace to print to the default printer, or you can use the Item property to specify the printer that you want to print to. Using either one, you can print a text document with as little as two lines of code, as shown in this code snippet:

With My.Computer.Printers.DefaultPrinter
.WriteLine(txtFile.Text)
.Print()
End With

In the Print A Document section was left over from the original text for this book. This entire section along with the code had to be rewritten during CE-AR edits due to changes in the software.
1/6/06
236 Error in Text
In the code in Step 6:
DialogResult.OK
should be prefixed with:
Windows.Forms
so the code reads:

Windows.Forms.DialogResult.OK
06/05/2006
243 Text Error
The Try It Out heading:

the ColorDialog Control
should be:
Working with the FolderBrowserDialog Control
1/05/06
422 Error in Text
second sentence of the step 3 in the "Try It Out":

"Right-click the Secure Login project in the Solution Explorer..."

should be read as:

"Right-click the Access Control project in the Solution Explorer..."
1/24/06
17 558 Error in Text
Step 7 DefaultClientScript Property:

You can switch to source view on the default.aspx page. That is at the bottom left of the design area. In between the start and end <head> tags put the following:

<meta content="text/VBScript" http-equiv="content-script-type" />
05/18/2006
563 Error in Text
first bullet of step 6:
"Sert ID to rfvFirstName"
should be:
"Set ID to rfvFirstName"
1/24/06
566 Error in Text
4.3 :
Server Explorer

should be:
Solution Explorer
12/05/06
681 New method
The method ChannelServices.RegisterChannel(channel) is now obsolete. Although it will compile with only a warning and still work, you should use the new method signature ChannelServices.RegisterChannel(channel, False).
3/28/06
1007 Error in Figure
Figure 20-15:

IDC_CANCELORDER should be IDC_CANCEL to be consistent with the code download.
1/28/2008
1007 Error in Figure
Figure 20-17:

"IDC_PRODCUCTNAME"

should be:

"IDC_PRODUCTNAME".
01/28/2008

Related Titles

More By These Authors

Visual Basic

by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Rama Ramachandran, Kent Sharkey, Bill Sheldon
Back to Top