Microsoft KB Archive/94730

= Corrections for Errors in the Visual Basic for MS-DOS Manuals =

PSS ID Number: 94730

Article Last Modified on 1/9/2003

-

The information in this article applies to:


 * Microsoft Visual Basic for MS-DOS 1.0

-



This article was previously published under Q94730



SUMMARY
This article gives corrections for errors in the following manuals:


 * &quot;Microsoft Visual Basic Programmer's Guide&quot;
 * &quot;Microsoft Visual Basic Language Reference&quot;
 * &quot;Microsoft Visual Basic Professional Features&quot;

This master list of corrections includes and adds to the correction list in the README.TXT file.



Corrections to &quot;Microsoft Visual Basic Programmer's Guide&quot;
Page xvii

REMLINE.MAK is not shipped with Visual Basic. SORTDEMO.MAK and TORUS.MAK are included in the Professional Edition only. The file for the SPIN custom control is SPINDEMO.*, not CUSTCTRL.*.

Page 45, Adding Code to the Form_Load Procedure

The First Sentence of the first Note should read, &quot;By default, the control with the TabIndex Property set to 0 will get the focus after the Form_Load precedure executes.&quot; In other words, change &quot;set to 1&quot; to &quot;set to 0.&quot;

Page 171, list of modules at the bottom of the page

Remove the references to HELP.BAS, HELPF.FRM, and HELPUTIL.FRM. These files are not included in the standard edition.

Page 200, table at top of page

&quot;ir1_Click&quot; should be &quot;Dir1_Click&quot;

Page 350, Passing Arguments of Unkown Type

The entire paragraph should be deleted.

Page 374, code in &quot;A Practical Use for Recursion&quot;

The following declaration at the top of the code is incorrect:

FUNCTION DirDiver%(NewPath AS STRING, DirCount AS INTEGER, ... Replace the entire line with the following:     FUNCTION DirDiver(NewPath$, DirCount%, BackUp$) AS INTEGER And replace the following line:      Dir1.Path = NewPath with this corrected line:      Dir1.Path = NewPath$

Page 375, continued code

Replace the following line:

If BackUp$ THEN Dir1.Path = BackUp$ with the following corrected code: If BackUp$ <> &quot;&quot; THEN dirList.path = BackUp$ END IF

Page 490, last part of the second paragraph

should read &quot;and 0K of XMS for the programming environment.&quot;

Page 497, Memory Map Table

&quot;Quoted string literals&quot; should be located under Near Heap Data (Dgroup), not Far Data Heap.

Page 519, Alias Keyword

The Alias keyword is available in Visual Basic for Windows, not Visual Basic for MS-DOS.

Page 534, String Routines

All of the following string routines are available in Visual Basic for MS-DOS and are completely compatible with the Microsoft Basic Professional Development System: StringAddress, StringAssign, StringLength, StringRelease.

Page 563, Drawing the Form

The illustration does not match the code that accompanies it. The text boxes should be labels and they should display different data.

Page 564, Adding Code to Load the Form

The code that loads the form should be:

CASE &quot;B&quot; frmSTUDENT.SHOW 1

pages 573 and 599, the illustration for the code translator

The &quot;Form or Code &Module (.FRM; .BAS)&quot; option button should say, &quot;Form &Module (.FRM)&quot; because .BAS modules are translated with the project option, but should be done by hand.

Corrections to &quot;Microsoft Visual Basic Reference&quot;
Page iii, Document Conventions

Keywords are shown in normal, uppercase in tables. Not bold. Keywords and literals are bold in syntax.

Page 23, ADDITEM Method

At the top of the page, remove the sentence that begins &quot;ListIndex is set to -1 (no item selected) ...&quot;

Page 29, AutoRedraw Example

The third sentence that introduces the example should read &quot;Printed output on the form is retained when the form displays because AutoRedraw is True.&quot; It is important to set AutoRedraw to True if you want to display printed output during the Load event.

Page 31, Applies To

The ForeColor property does not apply to the command button or scroll bars.

Page 34, BorderStyle Property

BorderStyle is read-only at run time for the forms and text box controls. It is read/write at run time for labels and picture boxes.

BorderStyle 3 has Minimize and Maximize buttons.

Page 123, DragDrop Event Syntax

Event procedure parameters (Source, X, Y, and Index) should not be bold. You may use any names for these parameters. The ones shown are provided automatically when you create an event procedure with the Edit Event Procedures dialog box. This applies to all event procedure syntax in the Reference.

Page 145, ERR Statement

The value of n% cannot be >255.

Page 170, FORMAT$ Function

The formatting characters for fmt$ are omitted. See online Help for this information.

Page 201, $INCLUDE Syntax

The syntax for the $INCLUDE metacommand is as follows:

{' | REM}$INCLUDE: 'filespec'

Page 212, INPUTBOX$ Function

If prompt$ exceeds the length of a line, it automatically wraps to the next line.

Page 240, ListIndex Property

At the bottom of the page, remove the sentence that begins &quot;ListIndex is set to -1 (no item selected) ...&quot;

pages 251, 329, 330 LPRINT, Print, Print #

You can't use the comma with the USING clause in any of these statements or methods.

Page 259, Menu Control

There is no DropDown event for menu controls.

Page 274, MSGBOX Function

The last line of example text should read:

x% = MSGBOX(Msg$) The statement &quot;Example See DIM Statement example&quot; should be deleted.

Page 331, Print Statement

The Print statement documentation is included under the LPRINT statement.

Page 342, REMOVEITEM Method

At the top of the page, remove the sentence that begins &quot;ListIndex is set to -1 (no item selected) ...&quot;

Page 351, SCREEN Object

AutoRedraw does not apply to the SCREEN object.

Page 363, SETMEM

In the example, the following statement is incorrect:

If AfterCall <= BeforeCall THEN PRINT &quot;Memory not reallocated.&quot;

Change <= to < to correct the problem:

If AfterCall < BeforeCall ...

Page 433, WRITE # Remarks

The first paragraph indicates that using WRITE # to print to the screen causes an error if used with forms. It should state that this causes an error if forms are currently displayed.

Page 440, Scan Code Table

The scan code for decimal 78 is the gray + key, not - key shown.

Page 501, L2043

&quot;QUICKLIB.OBJ&quot; should read &quot;VBDOSQLB.LIB&quot;

Corrections to &quot;Microsoft Visual Basic Professional Features&quot;
Page 19, top

The first DECLARE statement is incorrect:

DECLARE SUB SetProperty ... It should read: DECLARE SUB GetProperty ...

Page 31, Format of .DEF File

The place holder segementname is the base name of the Basic source file plus the string _CODE. For example, if a module is named NEW.BAS, the segmentname is NEW_CODE.

Page 78, Code in the example near bottom of the page is incorrect:

DECLARE SUB ChangeArray(S$) CALL ChangeArray(A$(1)) It should read: DECLARE SUB ChangeArray(BYVAL offset%) DIM a$(1 TO 10) FOR i% = 1 TO 10 a$(i%) = STRING$(i%, ASC(&quot;A&quot;) + i% - 1) PRINT a$(i%) NEXT CALL ChangeArray(VARPTR(a$(1))) FOR i% = 1 TO 10 PRINT a$(i%) NEXT

Page 271, SLN# Function

The second bullet should be deleted.

Page 292, Using VBDPROF

Step 3 says that VBDPROF creates VPROF.BAT. Actually, VBDPROF creates PROF.BAT. Therefore, you need to change VPROF in step 4 to PROF.

Page 339, TOOLS.INI

There is no TOOLS.PRE file included with Visual Basic for MS-DOS.

Additional query words: VBmsdos 1.00 docerr

Keywords: KB94730

Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.