Corrections for Errors in Visual Basic Version 1.0 Manuals

ID Number: Q73655

1.00

WINDOWS

docerr

Summary:

Below are corrections for documentation errors in the manuals shipped

with Microsoft Visual Basic version 1.0 for Windows.

This master list of corrections includes and adds to the correction

list found in sections 2 and 3 of the README.TXT file shipped with

Visual Basic 1.0. Please use the article below as your master list for

making corrections to the Visual Basic manuals.

More Information:

Microsoft Visual Basic includes the following two manuals:

- "Microsoft Visual Basic: Programmer's Guide"

- "Microsoft Visual Basic: Language Reference"

In both manuals, all references to OS/2 and Presentation Manager (PM)

are misprints, and should be ignored.

Corrections to the "Microsoft Visual Basic: Programmer's Guide"

---------------------------------------------------------------

(page xv) Middle of the page:

"OpenError" should be

"OpenError:"

(page 15) "Running Setup", delete the following (incorrect) sentence:

"You can start Setup from Windows or Presentation Manager, or from

DOS."

(page 50) Fourth line:

"... - he names assigned by Visual Basic." should be

"... - the names assigned by Visual Basic."

(page 61) "To set the Caption property:" #2, last line:

"...you can skip Step 4 and proceed to Step 5." should be

"...you can skip Step 3 and proceed to Step 4."

(page 76) Add the following at the end of the first paragraph:

"...to distribute copies of the run-time file; however, you can

only distribute this run-time DLL with the .EXE file you have

created in Visual Basic. You cannot distribute VBRUN100.DLL by

itself."

(page 76) Bottom of the page under "Search Help for:"

"executable" should be

"executable file"

(page 83) Table 9.1 Standard Variable Types

The Type-Declaration Character for Single should be "! (or none)"

and

the Type-Declaration Character for Double should be "#".

(page 88) Second line:

"...so that Ardvark < Zypher evaluates..." should be

"...so that "Ardvark" < "Zypher" evaluates..."

(page 89) Last sentence:

"... the calculation of Year.sR is local and a ..." should be

"... the calculation of Years. R is a local and a ..."

(page 97) First line:

"...calls to the LogB procedure..." should be

"...calls to the LogF procedure..."

(page 106) Code at bottom of page should be:

x = Shell("\winword\winword.exe c:\winword\plan.doc", 1)

and

y = Shell("\winproj\winproj.exe c:\winproj\schedule.wpr", 1)

(page 118) In the event procedure AddApp_Click, after the line of code

"Load AppName(LMenu)", insert the following:

AppName(LMenu).Separator = 0

Note that "Separator" is a property of a menu item that is not

documented in the manuals or in the on-line help. The Separator

property denotes whether or not a particular menu item is or is not

a Separator item. The caption of a Separator item in a menu cannot

be changed.

(page 129) Last paragraph, first line:

"...tabbing to the button and..." should be

"...tabbing to the option button group, using the arrow keys, and..."

(page 131) Middle of the page:

"Oct$, Str$, or Hex$ function..." should be

"Oct$, Format$, or Hex$ function..."

(page 146) Top:

"MsgBox msg$[,type%[,type%[,title$]]" should be

"MsgBox msg$[,type%[,title$]]"

(page 150) third column, description for FontSize:

"...(6 to an inch when printed)" should be

"...(72 points to an inch when printed)"

(This can also be expressed as "6 picas per inch when printed.")

(page 153) Lines 8 through 14:

All references to CurrentX should be CurrentY and vice versa.

(page 170) Code, middle of the page:

"TextBoxes(I).Visible = -1" should be

"TextBoxes(I).Visible = 0"

Code at bottom of the page, add the following as the first line in

the Form_Load procedure:

"Form1.Show"

and change the following:

Text1(I).Text = "Text1(" + Format(I) + ")" should be

Text1(I).Text = "Text1(" + Format$(I) + ")"

(page 182) Code at top of page:

[object.]Line[(x1, y1)] - [x2, y2) [, color] should be

[object.]Line[(x1, y1)] - (x2, y2) [, color]

(page 194) Middle of the page:

"...given in the reverse order (Pi/3, Pi/2)..." should be

"...given in the reverse order (-Pi/3, -Pi/2)..."

(page 204) Last paragraph, second line:

"...continuous line when mouse button..." should be

"...continuous line when the left mouse button..."

(page 217) First sentence:

"... to add forms to your application You can create ..." should

be

"... to add forms to your application. You can create ..."

(page 223) Last paragraph, second line:

"...(named GroupChoice)..." should be

"...(named GroupList)..."

(page 226) The following statement is incorrect:

Any data stored in the form is lost unless you have saved it to a

file.

This statement should be changed to read as follows:

Any data stored in the form, with the exception of static variables

and arrays, is lost unless you have saved it to a file. The values

of static arrays and variables are preserved after the form is

unloaded.

(page 248) All references to the property DrawColor should be

omitted. There is no DrawColor property.

(page 261) First paragraph, second line:

"...variable-length strings." should be

"...fixed-length strings."

(page 267) Code at bottom of page:

All references to "Picture1.Picture" should be

"Form1.Picture1.Picture"

(page 270) Code at bottom of page third line from bottom:

"...Mid$(MyTime, 1, 2)..." should be

"...Mid$(MyTime, ((Hours-12)<10)+2, 2)..."

(page 276) Third paragraph, second line:

"KeyPress event ....The same thing happens when..." should be

"KeyDown event ...The KeyDown event gets the same code when..."

(page 288) Last line:

"MB_EXCLAIM" should be

"MB_ICONEXCLAMATION"

(page 289) Code:

All references to MB_EXCLAIM should be changed to MB_ICONEXCLAMATION

(page 308) Third paragraph of code, second nested IF THEN statement:

"If FileListBox.List(ind) = ..." should be

"If FileListBox.List(Ind%) = ..."

(page 311) The code under "FileListBox_DblClick"

"FileListBox.Pattern = *.*" should be

"FileListBox.Pattern = "*.*" "

(page 313) Do Loop should be:

Do Until Instr(LastOne% + 1, Test$, "\") = 0

LastOne% = Instr(LastOne% + 1, Test$, "\")

Loop

(page 320) Last paragraph, last sentence should be:

"The maximum length of a file that can be edited with Text Editor

is a little less than 32,000 bytes, because that is the default

maximum number of characters you can assign to a Visual Basic

multiline text box control."

(page 323) Code, middle of the page:

"Global Const ErrBadFileNameOrNumber = 52..." should be

"Global Const Err_BadFileNameOrNumber = 52..."

"Global Const MB_EXCLAIM = 48..." should be

"Global Const MB_ICONEXCLAMATION = 48..."

(page 324) Code, ninth line from top should specify form name, as in

Form1.SaveButton.Caption = "Save/New File"

because this Sub is in a general module.

(page 330) Code sample seventh to last line and (page 331) second line:

"EndLine$ = Input$(1, 1)" should be

"EndLine$ = Input$(1, FileNum)"

(page 339) Code under "Form_Load":

Add the following as the first line after "Sub Form_Load":

Form1.Show

[Without this change, running the code will result in an error:

"Illegal Function call" on the statement "FieldBoxes(0).SetFocus"

on the second-to-last line. This is because the Form is not yet

visible.]

(page 339) Code at bottom of page:

"WorkingFileNum = FileOpener..." should be

"WorkingFileNum% = FileOpener..."

(page 341) All reference to FieldBoxes in the code example on Page

341 should specify the form. For example:

Form1.FieldBoxes

(page 342) The statement in the OpenFile_Click code that reads

Result% = CopyFile(TheName$, BakName$, RANDOMFILE)

should be changed as follows:

Result% = CopyFile(TheName$, BakName, RANDOMFILE)

The variable "BakName" is defined as a global string, so it is not

necessary to explicitly type it using the dollar sign.

(page 346) First paragraph after code, second sentence:

"...the statement RecordVar RecordNum = Ind% because ..." should be

"...the statement TempVar.RecordNum = Ind% because ..."

(page 357) The last two sentences of the Note should be deleted and

should be replaced with the following:

"If no application responds, Visual Basic generates a run-time

error."

(page 359) The first paragraph, last sentence should be:

"If the server application specified in the LinkTopic property is

not running, Visual Basic will generate a run-time error."

(page 360) Note at bottom of page:

References to the ALT key should be ESC key.

(page 364) The Link Execute Event, second argument, last line of

description:

"...the client receives a negative argument." should be

"...the client receives a negative acknowledgment."

(page 369) Under the "Starting Other Applications" section:

"If you attempt to establish a DDE conversation with an application

that is not currently running, Visual Basic displays a message

asking if the user wants to start the application."

This should be changed to be as follows:

"If you attempt to establish a DDE conversation with an application

that is not currently running, Visual Basic displays the message

'No foreign application responded to DDE request'."

In the program example, add the following as the first line after the

Sub statement:

Const DDE_NO_APP = 282

Also, in the program example:

"If Err = DDE_NO_APP" should be changed to be as follows:

"If Err = DDE_NO_APP Then"

(page 370) "Requesting Data from Other Applications"

All references to "warm link" should be references to "cold

link".

(page 371) "Notifying Other Applications..." first paragraph:

"(in the case of a warm link)" should be

"(in the case of a cold link)".

(page 378) "To load a custom control file:"

Delete step 2 (the second line).

"Type or select the name..." should be step 2.

(page 380) Under "Special Considerations When Declaring DLL Routines":

The statement "The Visual Basic package contains a file that

includes the declarations for all useful routines in the operation

..." is incorrect. This file is not included with Visual Basic, but

is part of the add-on kit, "Microsoft Windows Programmer's

Reference" Book and Online Resource, available from Microsoft at a

charge.

(page 385) Function declaration at the very bottom of the page:

Declare Function FindWindow% Lib "User" (Class as Any,

Caption as Any)

should be changed to be as follows:

Declare Function FindWindow% Lib "User" (ByVal Class as Any,

ByVal Caption as Any)

ByVal is needed because the function expects null-terminated strings.

(page 386) Code at top of page:

The first set of quotation marks around "Microsoft Excel"

should be straight quotation marks.

Add the following paragraph after first code fragment:

"The use of ByVal when passing a string is necessary because the

data type of that argument was declared As Any. Including ByVal

when passing a string declaring AsAny causes Visual Basic to

convert the string to the null-terminated form expected by most DLL

routines."

The following code at the bottom of the page:

"...Lib "User"..." should be

"...Lib "GDI"..."

(Index) A, "ALT key":

Delete "interrupting DDE 360"

A, "As Any":

Add to page list: "386"

C, after "CurrentY", add the following two entries:

"Cursor Search Help files for Mouse Pointer"

"Cursor position see Insertion point"

E, after "Errors":

Add new topic: "ESC Key, interrupting DDE 360"

I, "Index property":

Add to page list on "creating control arrays": "117"

I, "Insertion point", after "defined", add the following:

"locating 264"

L, "Line Method":

"boxes 188-188" should be

"boxes 188-189"

M, "Microsoft Visual Basic":

Change page list on "starting programs" from "17-18" to "16-17"

S, "Strings":

"variable-length 251, 385" should be

"use of ByVal with variable-length 251, 385, 386"

Corrections to "Microsoft Visual Basic: Language Reference"

-----------------------------------------------------------

(page 6) Action:

"Define a Sub procedure" should be

"Define a procedure"

"Call a procedure" should be

"Call a Sub prodedure"

(page 7) in the list of objects,

"List" should be

"List Box"

(page 9) Windows category:

"hWin" should be

"hWnd"

(page 11) The Height property for the Screen object is Read-only at

run time for all objects (and should be marked in this chart

with half-dots instead of whole dots).

(page 27) Add to the Note the following paragraph:

"When you minimize a form whose AutoRedraw Property is set to False

(0), ScaleHeight and ScaleWidth are set to icon size. When

AutoRedraw is set to True (-1), ScaleHeight and ScaleWidth remain

the size of the restored window."

(page 31) Description:

"...for an object; for forms and picture boxes..." should be

"...for an object, for forms and text boxes..."

For the Note:

"...use the Show method with the form at run time. To make a

form modeless, set its Visible property to True(-1)." should be

"...use the Show method with Style% = 1. To make a form modeless,

use Show with Style% = 0."

Add the following paragraph at the end of the Remarks section:

"Because of appearance, the BorderStyle for forms with a menu can

only be set to Sizeable (2) or Fixed Single (1). Setting the

BorderStyle property to None (0) or Fixed Double (3) forces the

BorderStyle property to Fixed Single (1)."

(page 52) Graphic image:

The image shown is an example of a check box; it should show a

combo box example.

(page 68) DblClick event: Need to remove "directory list box" from

the "Applies To" list for the DblClick event, because the DblClick

event does not apply to directory list box controls.

(page 72) The following superfluous line should be deleted:

Declare First Sub Lib "MyLib"

(page 130) For the Function statement's "As Type" argument for the

argument list, the last two sentences

"You cannot use an array of fixed-length strings...to a Function

procedure.... However, you can...because...to a Function

procedure."

need correction and should be changed to read as follows:

You can pass a fixed-length-string array as a parameter in Sub or

Function statements as follows:

x() As String*n

where x is the array name, and n is the size of the fixed length

string. (In the invocation of the Function, you pass the array x()

without the "As type" argument.)

However, when you use a simple (non-array) fixed-length string as

an argument in a Sub or Function statement, you must specify "As

String" (not "As String*n), because Visual Basic converts a simple

fixed-length string argument to a variable-length string argument

before passing the string to a Sub or Function procedure.

(page 147) Description:

"read-only" should be

"read-write"

Change the Note to be as follows:

"For a form icon to be functional, the BorderStyle property must be

set to either 1 (Fixed Single) or 2 (Sizeable). The MinButton

property must be set to True (-1)."

"At runtime, you can assign an object's Icon property to another

object's DragIcon or Icon property. You can also assign an icon

returned by the LoadPicture function. Doing this assigns an empty

(null) icon, which enables you to draw on the icon at run time."

(page 154) Despite references on page 154 and in the VB.EXE

online Help, the INPUT$ function is not supported

for files opened with random access. Attempting to

use INPUT$ on a file opened for random access results

in a "Bad file mode" error message. (Use of INPUT$ on

random files was eliminated in Visual Basic, as was

the older Basic statement FIELD.)

(page 156) Condition:

"strexpr1$ found in strexpr2$" should be

"strexpr2$ found in strexpr1$"

(page 158) Remarks, bottom:

"...property determines if timer responds..." should be

"...property determines if the timer control responds..."

(page 175) Remarks, add the following at the end of the "Cancel"

description:

"(The default is set to -1, meaning cancel)"

(page 184) In the second line of the Note:

"...by pressing the ALT key." should be

"...by pressing the ESC key."

(page 188) Last line of description should be:

"The List property is not available at design time; it is read-only

for drive, file, and directory list boxes and read-write for combo

and list boxes."

(page 191) Under Remarks, the event ordering when a form is loaded

should be changed to be as follows:

ReSize, Load, GotFocus, Paint

(page 204) Syntax:

"Mid$ (stringexpression$, start&, [length&])" should be

"Mid$ (stringexpression$, start& [,length&])"

(page 209) Month Function:

In the Case statements, delete all numbers greater than 12.

(page 244) Pointer Property:

This property does not exist. The name was changed to MousePointer

Property (page 214).

(page 254) In the code example at the bottom:

"Dim Deck()" should be

"Global Deck()"

(page 283) For SendKeys statement, {PG DN} should be {PGDN},

otherwise you get an "illegal function call" at run time.

(page 284) SendKeys Statement:

"{SCROLLOCK}" should be

"{SCROLLLOCK}"

If a program contains this misspelling, Visual Basic will display

the following error message:

"illegal function call"

(page 285) Syntax:

The syntax fo ClipBoard.SetData should be changed from

"ClipBoard.SetData (data%, [format%]) to

"Clipboard.SetData data%, [format%]"

(page 290) Middle of the page:

"...further user input can occur." should be

"...other forms can respond to events or accept user input."

(page 303) For the Sub statement's "As Type" argument in the

argument list, the last two sentences

"You cannot use an array of fixed-length strings...to a Sub

procedure.... However, you can use...because...to a Sub

procedure."

need correction and should be changed to read as follows:

You can pass a fixed-length-string array as a parameter in Sub or

Function statements as follows:

x() As String*n

where x is the array name, and n is the size of the fixed length

string. (In the Call statement for the Sub, you pass the array x()

without the "As type" argument.)

However, when you use a simple (non-array) fixed-length string as

an argument in a Sub or Function statement, you must specify "As

String" (not "As String*n), because Visual Basic converts a simple

fixed-length string argument to a variable-length string argument

before passing the string to a Sub or Function procedure.

(page 318) Under Remarks for the TimeSerial Function, the following

statement is incorrect:

"If the time specified by the three arguments, ..., falls outside

the acceptible range of times, Visual Basic generates an error."

This sentence should be deleted (or should be changed to say that

Visual Basic will generate an error if a TimeSerial argument exceeds

the limits of its declared type, which is integer).

(page 325) Second paragraph under Remarks for the Val statement:

"The Val function also strips out leading blanks, tabs, and

linefeeds from the argument string. For example, the following

returns the value 1615:"

should be changed to read as follows:

"The Val function also strips blanks, tabs, and linefeeds from

the argument string. For example, the following returns the

value 1615198:"

(Appendix A) ANSI Table at bottom of page:

"Values 8, 9, 10, and 13 convert to tab, backspace, linefeed..."

should be:

"Values 8, 9, 10, and 13 convert to backspace, tab, linefeed..."

Additional reference words: 1.00