Learn To Program With Visual Basic 6
Every author endeavors for perfection. My apologies for the typos that have slipped
through. We'll do our best to have these corrected for the next printing. (Some of you may not
see these errors---we're now on the fourth printing of the book, and some of these have been
corrected. By the way, the publisher's solution to the Faberware-Farberware issue was to
change later printings of the book to read Faberware everywhere.
Unexpected Error--call John Smiley
This happens when you copy the completed Project
(either the one on the CD or one you downloaded somewhere) to your hard drive
and try to run it. The reason for that is that the program is 'hard coded' to
run from only one location (you'll learn how to fix this in the Objects book
using the Path property of the App object).
At any rate, the program can only run from this
location
C:\VBFILES\CHINA
so make sure you copy the files there. Any other
location will cause this problem.
General
- Every reference to Faberware in the book should be
'Farberware'
- When placing a control on a form, you cannot directly drag a control from
the toolbox to the form. You can either doubleclick the control in the toolbox,
thereby placing it in the middle of the form or, click on the control in the
toolbox to select it, then release the mouse button, and then click and draw
the control on the form.
Chapter 1
- Page 10, middle of the page---"...similar to a something the programmer.." should read "...similar to something
the programmer..."
- Page 47, middle of the page---"...we don't write actually write" should read "...we don't actually write"
- Page 49, tip, towards the bottom---"Once entry has been gained, the rides they go on and the in order in which" should read
"Once entry has been gained, the rides they go on and the ..."
Chapter 2
None that I know of
Chapter 3
- Page 128, first sentence under the heading "The Modes of Visual Basic"---"I should explain
at his point" should read "I should explain at this point"
- Page 134, screen shot. "List Contents" should be "List Constants"
- Page 134, second sentence after the screenshot---"We'll come to how to display" should
read "Later, we'll see how to display"
- Page 155, the section dealing with twips and device independence. Actually, this is not the case with monitors.
A twip is fixed in length only when printed. So that a form 14,400 twips in length on a 14 inch monitor
may not necessarily be the same length as a form 14,400 twips in length on a 17 inch monitor---
Although both would be the same if printed using the PrintForm method.
Chapter 4
- Page 194, first sentence after second table---"...the rest of the name should meaningful
describe it" should read "...the rest of the name should meaningfully describe it"
- Page 203, top of the page---"invoked the Move event of the form" should
read "invoked the Move method of the form"
Chapter 5
- Page 209, 4th paragraph---"The toolbox contains controls that we use to build..." should read
"The toolbox contains controls that we will use to build"
- Page 215, Next to last line. Need space between "the" and "dimensions"
- Page 243:The exercise beginning on page 243 suggests
control names that begin with "Chk". Hungarian notation would show this as
"chk".
- Page 261, under the Comments for Autosize in the second table---"To accommodate a date
and time which can ..." should read "To accommodate a price which can ..."
- Page 273, Question 19 of the quiz---"What is the property of the Image control that tells it to
change shape to accommodate the graphic file being loaded into it?" should read
"What is the property of the Image control that tells the graphic file
to resizes to fit the size of an Image control?"
- Page 282, inside the table, List Box Row,Comments Column.
"Used to display a graphic of a china patter..." should read
"Used to display a graphic of a china pattern..." should read
Chapter 6
- Page 286, Step 6 of the exercise. lstBrands.AddItem "Faberware" should read
lstBrands.AddItem "Farberware"
- Page 286, Screenshot. "Faberware" should read
"Farberware"
- Page 287, Screenshot. "Faberware" should read
"Farberware"
- Page 288, Screenshot. "Faberware" should read
"Farberware"
- Page 289, Screenshot. "Faberware" should read
"Farberware"
- Page 291, Screenshot. "Faberware" should read
"Farberware"
- Page 293, Screenshot. "Faberware" should read
"Farberware"
- Page 294, Both Screenshots. "Faberware" should read
"Farberware"
- Page 295, Screenshot. "Faberware" should read
"Farberware"
- Page 296, Screenshot. "Faberware" should read
"Farberware"
- Page 309, under discussion: There's a mention of the Activate event, but I never
discussed it! Sorry.
- Page 309. Under the heading “Discussion.”
On the 7th line it reads “sentries” … should be “entries.”
- Page 320, middle of the page---"This line of code will causes the loop..."
should read "This line of code will cause the loop ..."
Chapter 7
- Page 338, middle of the page---"I highly recommended that Require Variable Declaration is always
selected." should read "I highly recommended that Require Variable Declaration always be selected."
- Page 340, middle of the page---"to designate the date type of a variable" should read
"to designate the data type of a variable"
- Page 342, last code window. Dim invtalue2 should be Dim intValue2
- Page 352. "Variables declared as string types are initialized to a special Visual Basic value called EMPTY." This should read "Empty String"
- Page 358, Currency Data Type. The currency data type takes 8 bytes of RAM not the 2 bytes stated.
- Page 365, 366. Some readers have reported that the section on Constants abruptly ends at the bottom of
Page 365. It should continue on 366. If you are missing the top of 366, here it is.
chance that the value of the variable will ever change, what you have there is a constant
and you should declare it as such."
We had been working for some time and, since there were no more questions, I suggested
that we take a break.
- Page 378. "So the result of this example with either be True or False …"
should read "So the result of this example would either be True or False …"
- Page 390. "An example of a comparison operator is the word Not, …"
should be "An example of a logical operator is the word Not, …"
Chapter 8
- Page 394, first sentence. "I began by reminded everyone …"
should read as follows, "I began by reminding everyone …"
- Page 421, Screenshot. "Faberware" should read
"Farberware"
- Page 425, Screenshot. "Faberware" should read
"Farberware"
- Page 427, Exercise. The line of code if lstBrands.Text = "" should have no
space between the quotation marks!
- Page 430, Screenshot. "Faberware" should read
"Farberware"
- Page 432, in the first Code Window on the page, the first line "If lstBrands.Text = -1 Then"
should read "If lstBrands.ListIndex = -1 Then"
Chapter 9
- Page 469, Code window. Delete the line that reads intValue = intValue +1. It's not necessary.
- Page 470, Code window. Delete the line that reads intValue = intValue +1. It's not necessary.
Chapter 10
- Page 501, near the bottom of the page, a gender identiy crisis!
"as I showed her the help file" should read "as I showed him the help file"
- Page 508. Code shows
strPiece = Mid$(strSource,
intCounter, _
intLengthOfSearchfor)
If strPiece = strSearchFor Then
Mid$(strSource, intCounter, _
intLengthOfSearchfor) = strReplaceWith
This should read
strPiece = Mid$(strSource,
intCounter, _
intLengthOfSearchfor)
If strPiece = strSearchFor Then
Mid(strSource, intCounter, _
intLengthOfSearchfor) = strReplaceWith
Page 517 explanation describes the Mid statement which is correct.
- Page 512. intLengthofReplaceWith is mentioned, but never shows up in the code.
I was thinking of doing a lot more with this search and replace
algorithm, but decided against it at the last minute.
This remnant got
through!
- Page 518, the screen shot is not showing the results of the program execution.
Chapter 11
- Page 542, Screenshot. "Faberware" should read
"Farberware"
- Page 547, code window: "do not hestiate to contact me" has an extra space.
- Page 549, Printer.FontSize = "36" should read Printer.FontSize = 36. FontSize is a Single Data type and should not be enclosed
within quotations (although the code works because VB is very forgiving here).
Chapter 12
- Page 594. About the 10th sentence from the bottom of the page reads,
"So at this point, … the color will go back to that that drab gray."
The sentence should read as follows,
"So at this point, … the color will go back to that drab gray."
- Page 606, code window: "I love VisualBasic" should read "I love Visual Basic"
Chapter 13
- Page 620. About the 4th sentence down from the top.
"I have a exercise for you to do …" should read as follows,
"I have an exercise for you to do …"
- Page 643, code window: The new variables should be declared as a Currency Type
- Page 646, paragraph 6 Reads "I suggested we look at the revised code in the Click event procedure of cmdCalculate." It should read
"I suggested we look at the revised code in the Load event procedure of frmMain."
- Page 657, questions 14 and 15. Do not match the questions found in Appendix A
Chapter 14
Chapter 15
None that I know of
Appendix A
- Page 714, Code Window. Our Error Handler has disappeared---it should be there.
- Page 719. The 3rd sentence from the top reads,
"Then we’ll then pack up and head off to the China Shop." It should read as follows,
"Then we’ll pack up and head off to the China Shop."
- Page 723. Under the sub-heading “Discussion” about
the 16th sentence from the bottom of the page, it reads,
"That mean that we don’t want to pass it any extra information …"
should read as follows,
"That means that we don’t want to pass it any extra information …"
- Page 753, the answer to Number 8. Arguably, this should be a single line If statement
- Page 746, the answer for Number 16 has been left out (= F4 key) and the
answer printed for Number 16 is in fact the answer for Number 17.
- Page 754, quiz question 13 is missing the word
'Then' in the compound If statement
- Page 755, the answer to Number 16 should be 'Yes'
- Page 757. the answer to Number 2. For Each...Next should be Do until...Loop.
- Page 757 and 758. The answers to numbers 8
through 10--there should be an '=' sign in the For statement. It's missing.
- Page 757, the answer to number 8. The purists
among you might argue that the initial value of lngCounter is actually 0, and
you would be right. I should have worded the statement in such a way to probe
your understanding that the start value of the loop is 22.
- Page 758, the answer to number 10. The ending
value of the counter actually reaches 401.
- Page 759, the answer to number 16. The question
doesn't match the question asked on Page 483. The answer is correct for the
question as printed on Page 483.
- Page 765. Number 1. "Can you name Can you name …” should read "Can you name …"
- Page 768. Questions 14 and 15 do not match the end of chapter questions--however, the answers are correct.
The Number of visitors to this page since September 29, 1998
© 1998-2001, Smiley and Associates, Inc.
Revised - October 11, 2002
webmaster@johnsmiley.com
[