VB Language Developer's Handbook
Last updated 19 November 2001.
Chapter
|
Page |
Where |
Replace |
With |
|
1 (Added 11/2/2000) |
84 |
Listing 1.21 |
'
If there's more than one delimiter, map them If
Len(strDelimiter) > 1 Then |
'
If there's more than one delimiter, map them If
Len(strDelimiter) > 1 Then |
|
1 (Added 11/2/2000) |
87 |
Listing 1.23 |
dhLastWord function |
Public Function dhLastWord( _ |
| 1 (Added 11/2/2000) |
88 |
Beneath the Note section |
The dhLastWord function is
a bit different: It uses the built-in Split function to do its work.
Because Split does its work more efficiently than dhExtractString does
(as long as you’re interested in having the entire string parsed,
which you are in this case), it makes sense to use this built-in
function. Once the code removes all extraneous spaces, it can split the
input string into words, and then return the final word in the array
returned from Split: astrItems
= Split(strText) strTemp
= astrItems(UBound(astrItems)) |
The dhLastWord function is bit more complex, because the code must first find the number of words in the string, and then extract the correct one: intCount = dhCountWords(strText) strTemp = dhExtractString(strText, intCount) |
|
9 (Added 1/31/2001 |
|
Not in book: in code samples |
In the Font class, replace Public Size As Long |
Public Size As Single |
|
9 (Added 1/31/2001) |
569 |
Listing 9.17 |
The Size member of the Font class needs to be a Single, not a Long integer, so that floating point sizes can be supported. Replace: Dim intOldSize As Integer and all references to intOldSize in this listing. |
Dim sglOldSize As Single All references of intOldSize should be replaced with sglOldSize. |
|
9 (Added 1/31/2001) |
|
Not in book: in code samples |
NonClientMetrics.CalcSize: Private Function
CalcSize( _ |
Private Function
CalcSize( _ |
|
9 (Added 1/31/2001) |
577 |
Code
fragments (also CalcSize in NonClient- |
points
= -Int(lngHeight * 72 / lngLogPixelsY) (Remove call to the Int function, because the code should return a Single.) |
points
= -(lngHeight * 72 / lngLogPixelsY) |
|
12 (Added 8/20/2000) |
765 |
Listing 12.31 |
If ((GetAttr(strPath & strFile) And lngAttr) >0) _ And (strFile <> ".") And (strFile <> "..") Then |
If (strFile <> ".") And (strFile <> "..") Then |