Microsoft KB Archive/91131

From BetaArchive Wiki

Microsoft Knowledge Base

README.TXT for Standard Edition of Visual Basic for MS-DOS 1.0

Last reviewed: February 21, 1995
Article ID: Q91131

The information in this article applies to:

  • The Standard Edition of Microsoft Visual Basic for MS-DOS, version 1.0

SUMMARY

Listed below is the complete contents of the README.TXT file distributed with the Standard Edition of Microsoft Visual Basic version 1.0 for MS-DOS.

MORE INFORMATION

                                  README.TXT

      Release Notes for Microsoft (R) Visual Basic (TM) for MS-DOS(R)

                         Standard Edition Version 1.00

                 (C) Copyright Microsoft Corporation, 1982-1992

This document contains release notes for version 1.00 of Microsoft Visual Basic for MS-DOS. Information in this document is more current than that in the manuals. Information in online Help may also be more current than that in the manuals.

Microsoft revises its printed documentation at the time of reprinting, so manuals with document numbers ending in numbers higher than "0992" may include the corrections listed in parts 2-4. Document numbers are found on the copyright page of each manual.

Contents

Part    Description
----    -----------

1       Notes on Using Microsoft Visual Basic

2       Corrections to "Microsoft Visual Basic Programmer's Guide"

3       Corrections to "Microsoft Visual Basic Reference"

4       Corrections to Online Help

Part 1: Notes on Using Microsoft Visual Basic

This part contains the following sections:

    1.1  Tips and Tricks
    1.2  Forms
    1.3  Language
    1.4  LINK
    1.5  Hardware Considerations
    1.6  TRNSLATE.EXE

1.1 Tips and Tricks

Programming Environment Speed vs. Capacity

The programming environment (VBDOS.EXE) has been overlayed to increase capacity. The default in-memory size of VBDOS.EXE is tuned to provide a good speed/capacity tradeoff. If the environment seems slow to you, you can increase speed by using the /S:n command-line switch. This switch specifies the in-memory size of VBDOS.EXE. The default is approximately 350K. To increase performance, specify a value greater than the default. To increase capacity, specify a value less than the default. For more information, refer to Appendix B, "Memory Management" in the "Programmer's Guide."

Memory Configuration Suggestions

For systems running MS-DOS 5.00 and later, load MS-DOS and TSRs high to free as much conventional memory as possible. Optimal configurations for conventional, Extended memory (XMS), and Expanded memory (EMS) vary depending on the type and amount of memory available on your system. The following recommendations cover 1 MB, 2 MB, and =>3 MB configurations.

1 MB memory: If you have no XMS or EMS, the programming environment swaps to disk and all code is stored in conventional memory. To increase performance, set the /S:n command-line option to a value greater than 350 (default). This will reduce overlay swapping. To increase capacity, set the /S:n command-line option to a value less than 350. This reduces the in-memory size of the programming environment, providing more far memory for your program; overlay swapping increases however.

2 MB memory: If you have XMS, use a memory manager such as EMM386 to configure all available memory above 1 MB as EMS. EMS can be used by the programming environment for overlay swapping as well as for program code and data storage. If you do not have a memory manager that can configure XMS memory as EMS memory, or if you do not need EMS for code and data storage, use HIMEM.SYS to allow access to XMS memory for overlay swapping. HIMEM.SYS uses less conventional and XMS memory for itself than memory managers, such as EMM386.

3 MB or more memory: Configure 1.5 MB as XMS for programming environment overlay swapping and divide the remaining memory between EMS and disk caching (such as SMARTDRV.SYS). EMS provides more memory for program code and data and disk caching provides faster file access.

Debugging Compiled .EXEs

You must use the /D compiler switch to enable Out of Stack space, array bounds, and overflow checking in the compiled code. In addition, /D enables CTRL+BREAK at run-time in compiled .EXEs. This error checking is provided automatically in the programming environment.

Using VBDOS.EXE and Windows

Since VBDOS.EXE is opened for reading while it is being run (due to overlay support), you cannot automatically run VBDOS.EXE in two MS-DOS sessions with SHARE.EXE loaded. To allow running VBDOS in multiple sessions, make VBDOS.EXE read-only on your hard disk.

Ending Execution While Debugging

Pressing CTRL+BREAK while executing an application in the programming environment returns you to the currently executing code -- if a form is waiting for an event, you are returned to the code that invoked the form: either the module level of the start-up form or a SHOW method.

Terminating the application normally (by closing the last form, for example) returns you to your former location in code.

Inserting Special Characters

To insert a special character in the Code window or in the Settings box in the Properties bar:

  1. Set NUMLOCK on.

2. Press CTRL+P. 3. Hold down the ALT key and type the ASCII code of the character

   using the numeric keypad.

4. Release the ALT key.

Note that this process may not work for some characters below ASCII 28. In those cases, use the CHR$ statement to insert special characters in code. For example:

x$ = CHR$(21) ' Section symbol.

To insert a special character in a form application at runtime (for example, when typing in a text box):

  1. Set NUMLOCK on.

2. Hold down the ALT key and type the ASCII code of the character

   using the numeric keypad.

3. Release the ALT key.

Printing

PRINT method output (PRINT from a form module) always goes to the active form whether or not that form is visible. PRINT statement output (PRINT from a code module) always goes to the screen unless qualified by a form reference (FORM1.PRINT. The PRINT statement cannot be used when forms are showing. To send output to the screen from a form-based application, you must first hide all visible forms (SCREEN.HIDE) and then use the PRINT statement from a code module.

PRINT from the Immediate window applies to the currently active module if in a CTRL+BREAK state or to the Startup module if not in an edit-and-continue state. Therefore, if a code module is active, PRINT from the Immediate window is treated like the PRINT statement and the rules outlined above apply (PRINT statement not allowed when forms are showing). If the active module is a form module, PRINT from the Immediate window is treated like the PRINT method and applies to that form, whether or not it is visible.

Code Cleanup If you save your files in binary format, variable name table entries are preserved even after you have deleted all instances of a variable name. To eliminate these entries, save your files as text (ASCII) and then resave as binary. This increases capacity within the programming environment and reduces the size of your source files.

Visual Basic does not automatically remove unused event procedure templates that you create with the Edit Event Procedures dialog box. Make sure you delete all unused procedure templates before completing your project.

Form Redraw

The form painting and redraw algorithms in Visual Basic may not always refresh the screen at the time you expect. This is because they have been optimized to provide the best speed/redraw compromise. To repaint a form or control at any time, use the object's REFRESH method. For instance, PRINT output on a nonactive form may overwrite the shadow of the active form, since PRINT does not cause a form refresh. Use the REFRESH method on the active form after the PRINT method to redraw the shadow.

Accessing Network Drives

Setting the Drive or Path properties to a network drive may hang your application if the drive has disconnected.

Variable Names

Avoid using scalar variable names of the form "A.B". This type of variable naming is not supported Visual Basic for Windows and increases load time due to the special parsing that is required. Use the "." notation only when referencing properties, methods, or elements of a record variable. Replace variables of the form "A.B" with variables of the form "A_B".

Avoid using variable names that are also the names of properties or ControlPanel constants. Doing so can make it difficult to debug an application. Because the Help system recognizes these names, symbol Help for these variables is inhibited.

To work around this problem, rename VBDOS.HLP then request help on the variable. The programming environment displays an error dialog box. When you choose Cancel, the programming environment displays symbol Help for the variable.

Exiting When Out of Memory During Binding

If you run out of memory while binding in the programming environment, Visual Basic displays a dialog box with the "Out of Memory" error message. In some cases, choosing OK only redisplays the dialog box. If this occurs, pressing the SPACEBAR instead of ENTER may break the loop.

Math Coprocessor Performance

Memory managers such as EMM386 and 386MAX will slow performance of math operations using a coprocessor. For best results, do not have a memory manager resident when performing intensive math calculations using a coprocessor.

Distinguishing Between Apostrophe and Right Arrow Keys

The apostrophe (') and right arrow keys both return key codes of 39 in key event procedures. To distinguish between these keys in code, use a combination of the KeyDown, KeyUp, and KeyPress events as shown below:

SUB Form_KeyDown (KeyCode AS INTEGER, Shift AS INTEGER)

  SELECT CASE KeyCode
    CASE 39
      IF Shift = 0 THEN Tag = "arrow" ELSE Tag = ""
    CASE ELSE
  END SELECT

END SUB

SUB Form_KeyPress (KeyAscii AS INTEGER)

  IF KeyAscii = 39 THEN Tag = ""
  PRINT CHR$(KeyAscii);

END SUB

SUB Form_KeyUp (KeyCode AS INTEGER, Shift AS INTEGER)

  IF KeyCode = 39 AND Tag = "arrow" THEN PRINT CHR$(16);

END SUB

The preceding code takes advantage of the fact that KeyPress does not detect arrow keys -- if the key is detected in that event procedure, the code sets the form's Tag property to "" and prints the character. The Tag property is then used in the KeyUp event procedure to print a "\020" character if KeyCode 39 is detected.

QuickSort Algorithm

The following code demonstrates a Basic version of the commonly used QuickSort algorithm. QuickSort works by picking a random "pivot" element in SortArray, then moving every element that is bigger to one side of the pivot, and every element that is smaller to the other side. QuickSort is then called recursively with the two subdivisions created by the pivot. Once the number of elements in a subdivision reaches two, the recursive calls end and the array is sorted.

DEFINT A-Z DIM SHARED SortArray (1 to 50) ' Declare shared array.

InitializeArray            ' Fill with random values (code not shown).
QuickSort 1, 50                 ' Sort the array.

SUB QuickSort (Low, High) IF Low < High THEN

  ' Only two elements in this subdivision; swap them if they are out
  ' of order, then end recursive calls:
  IF High - Low = 1 THEN
    IF SortArray(Low) > SortArray(High) THEN
       SWAP SortArray(Low), SortArray(High)
    END IF
  ELSE
     ' Pick a pivot element at random, then move it to the end:
     RandIndex = INT(RND * (High - Low + 1)) + Low
     SWAP SortArray(High), SortArray(RandIndex)
     DO
       ' Move in from both sides towards the pivot element:
       I = Low: J = High
       DO WHILE (I < J) AND (SortArray(I) <= SortArray(High))
         I = I + 1
       LOOP
       DO WHILE (J > I) AND (SortArray(J) >= SortArray(High))
         J = J - 1
       LOOP
       ' If we haven't reached the pivot element, it means that two
       ' elements on either side are out of order, so swap them:
       IF I < J THEN
         SWAP SortArray(I), SortArray(J)
       END IF
     LOOP WHILE I < J
     ' Move the pivot element back to its proper place in the array:
     SWAP SortArray(I), SortArray(High)
     SwapBars I, High
     ' Recursively call the QuickSort procedure (pass the smaller
     ' subdivision first to use less stack space):
     IF (I - Low) < (High - I) THEN
       QuickSort Low, I - 1
       QuickSort I + 1, High
     ELSE
       QuickSort I + 1, High
       QuickSort Low, I - 1
     END IF
   END IF

END IF END SUB

1.2 Forms

Ending Form Applications

If your compiled application has a hidden form and then unloads the last visible form, the system appears to stop. This occurs because there is still a loaded form, but no way to access it. To avoid this, end your applications explicitly using an END statement or its equivalent, rather than relying on UNLOAD.

Note that reading or setting an unloaded form's properties or controls implicitly loads that form without displaying it. This is the most common way to get into the situation described above.

Visibility

Hiding a modal form makes that form nonmodal. Hiding an MDI form hides all of its children: Thus, any modal children will no longer be modal when they are shown again (unless explicitly shown again as modal). SCREEN.HIDE hides all visible forms: Thus, modal forms will be hidden and will no longer be modal when they are shown again (unless explicitly shown as modal).

You can change the Visible property of child controls while their parent is hidden, but the Visible property of child controls will return False (0) as long as the parent is hidden. For example:

frmOpen.Visible = 0                     ' Hide parent form.
cmdState% = frmOpen.cmdExit.Visible     ' cmdState% will be 0 (False)

frmOpen.cmdExit.Visible = NOT cmdState% ' Change Visible property.

frmOpen.Visible = -1                    ' Show form again.

In the preceding code, you might expect the third line to toggle the visibility of the command button. Instead, it sets Visible to True (NOT 0 = -1), regardless of the initial setting of cmdExit.Visible.

Menus and Timer Events

While a menu control has focus, timer events and ON <event> trapping are suspended. When the menu control loses focus, timer events and ON <event> trapping resume.

Insert State

Forms programs maintain the insert state internally. There is no way to programmatically switch between insert and overstrike in a text box.

Monochrome Displays

For best appearance on monochrome displays, you should avoid 3-D. For example, the following turns off 3-D if a system does not have color or grey scale capability:

SUB CheckMono ( )

  ON LOCAL ERROR GOTO SetNo3D
  SCREEN.HIDE
  SCREEN 1                   ' SCREEN 1 requires minimal graphics.
  ON LOCAL ERROR GOTO 0
  SCREEN 0
  SCREEN.SHOW
  EXIT SUB

SetNo3D:

  SCREEN.ControlPanel(THREE_D) = 0
  RESUME NEXT

END SUB

When creating form applications for users with monochrome monitors, be aware that the default color setting for access keys may display as bright white on bright white on some monitors. For applications that target this hardware, you may want to rely on tab order rather than access keys to provide a keyboard interface.

The sample applications included with Visual Basic are written for color monitors and monitors that support grey scale. If they do not display properly on your system, turn off 3-D in their form load event procedures.

Setting ForeColor Property

SCREEN.ControlPanel(THREE_D) must be set to FALSE (0) for changes to the ForeColor property to affect the border of a control. While THREE_D is TRUE (-1), Visual Basic supplies the border color.

Symbol Help on Controls

You cannot get Help on a control if it is not referenced in code from its parent form. For example, in module ONE.FRM:

SUB frmONE_Click() cmdOK.Visible = FALSE END SUB

In module TWO.FRM:

X$ = frmONE.cmdOK.Tag Y$ = frmONE.fraHelp.Tag

In the preceding example, pressing F1 on cmdOK displays symbol Help on the control, but pressing F1 on fraHelp only beeps.

Maximum Number of Controls

The maximum number of controls on a form is 254.

Maximum Number of Timers

You cannot have more than 16 active timers at any one time. A timer is active if its Enabled property is True and its Interval property is nonzero. Custom controls that function as timers also apply to this limit. This limit does not apply to inactive timers.

Forms in Quick Libraries

You can create Quick libraries out of form modules by following the same procedures for Basic code modules. To access the properties of a Quick library form or control in your application, you must declare the Quick library form by manually inserting a $FORM metacommand at the module level of the calling code.

With project files, the programming environment automatically inserts

'$FORM metacommands as needed. However, the programming enviroment

cannot do this for forms in Quick libraries, since they are already compiled.

Accessing Width and Height Properties Before Forms are Visible

To ensure correct values for a form's Width and Height properties and SCREEN.Width and SCREEN.Height, execute a SHOW method before using them.

"Overflow" with ASCII Forms

The Form Designer generates an "Overflow" error message if the absolute coordinates of an object exceed 255. This can occur only with ASCII form descriptions created outside of the Form Designer. "Absolute coordinates" are the values that result from combining the Top + Height or Left + Width property values of a control and its parents. When these combine in a way that the right edge or bottom edge of a control exceeds 255, the "Overflow" error results.

To fix this, you must reduce the Top, Height, Left, or Width property values of the object or its parents in the ASCII form using an ordinary text editor.

Child Form Placement in MDI Form_Load Event

To ensure the correct display of child forms and print output, add a SHOW statement as the first line of the Form_Load event procedure of any form that is an MDI container. For example:

' Event procedure in frmMDI.FRM.

SUB Form_Load ( )

    frmMDI.SHOW

END SUB

This forces a redraw event which sets the MDI container's ScaleHeight and ScaleWidth properties to their maximized settings, rather than the design-time settings.

Option Buttons and Modal Operations

Option buttons sometimes require multiple clicks to become selected if the code in their click events include modal operations such as displaying a MSGBOX or hiding forms. For example, the following code requires multiple clicks to select option buttons Option1 or Option2:

SUB Option1_Click () SCREEN.HIDE WIDTH , 43 SCREEN.SHOW END SUB

SUB Option2_Click () SCREEN.HIDE WIDTH , 25 SCREEN.SHOW END SUB

Separator Bar as First Menu Item

If you specify a separator bar as the first menu control below a top- level menu item, you won't be able to select menu items in that list using the keyboard.

KeyUp Events and Menus

KeyUp events for the active control will be generated when using access or shortcut keys for menus. To differentiate between menu generated KeyUp events and user generated KeyUp events for the active control, set a flag in the control's KeyDown event procedure that can be tested before processing keys in the KeyUp event procedure.

Child Form Width and Resize Events

If a child form has the same width as its MDI container, it will not generate a resize event when maximized.

Height and Width of Attached Scroll Bars

The Height and Width properties of scroll bars that are attached to a form do not return accurate values when the form is first displayed. Height and Width return accurate values after a resize event occurs.

Printing Attached Scroll Bars

Scroll bars that are attached to a form do not print if the the form is not active when the PRINTFORM method is invoked.

Forms Disable Blinking

Using MSGBOX, INPUTBOX$, or forms disables the blinking bit in MS-DOS. To re-enable blinking and restore correct COLOR statement settings when forms are not showing, call the MS-DOS interrupt 10H. For example:

' Requires VBDOS.QLB for CALL Interrupt.

REM $INCLUDE: 'vbdos.bi' DIM inregs AS regtype, outregs AS regtype CLS

COLOR 26, 6                 ' Blinking green on red.

PRINT "Blinking text"

SLEEP 1                     ' Pause.

screen.controlpanel(7) = 0 ' Preserve background.

MSGBOX "Click OK."          ' MSGBOX turns off blinking
                            ' and changes colors.
' These statements restore colors and blinking.

inregs.ax = &H1003 inregs.bx = 1 CALL interrupt(&H10, inregs, outregs)

Passing Control Array Elements

You cannot pass an entire control array to a procedure as an argument. When you pass a control array element to a procedure, you pass only that instance of the control, as in the following example:

type% = IsCmdBtn%(RandomControl(1)) ' Pass control array element to

                                    ' procedure.

FUNCTION IsCmdBtn%(X AS CONTROL)

  IF TYPEOF X IS CommandButton THEN
    FindType% = TRUE
  ELSE
    FindType% = FALSE
  END IF

END FUNCTION

Note that you can't discern that X refers to a control array element once the control is passed to the procedure.

In compiled programs, you cannot pass a control array element into a procedure, then load it from that procedure. For example, the following code generates the error "Control array element does not exist" if executed in a compiled program:

LoadIt cmdButton(1)

SUB LoadIt (X as CONTROL)

  LOAD X

END SUB

Note that the preceding code will run in the programming environment without an error. This difference occurs because compiled applications are "early bound."

TabStop Property

Using access keys on a form where all controls have TabStop = FALSE will cause unpredictable results.

1.3 Language

String Literals in Memory

String literals (i.e. quoted strings "This is a string") are stored in far memory. All string literals in a form or code module are stored in their own 64K segment. Thus, storage for string literals no longer comes out of DGROUP.

Line Continuation

When loading or compiling Basic code created outside of the programming environment, the underscore character (_) may be used to continue a line if it is preceded by a tab or space. Terminating a line with the underscore alone causes an error. The programming environment automatically joins continued lines and removes line- continuation characters when you load code. Note that the underscore without a preceding space can now be used in symbol names.

Keyword Conflicts

When loading a SUB or FUNCTION with an invalid definition -- a parameter list contains a variable with the same name as a reserved word -- that SUB or FUNCTION definition will not be recognized; instead it will be placed at the module level and flagged as an error. The code contained in the procedure will also be placed at module level. If this occurs, correct the invalid definition and reload the file.

RMDIR "."

Using RMDIR with "." generates the error "Path not found." You cannot remove the current directory.

User-Defined Error Numbers

Error number 105 is used by the system as a temporary error number and should not be used as a user-defined error number in your programs. If used, it halts execution of your application but does not generate the error message, "Unprintable Error," as other unassigned error numbers do.

Setting ERR

You cannot use the ERR statement with arguments greater than 255. To work around this, use ERROR to generate the error. For example:

ON ERROR RESUME NEXT ERROR 431 PRINT ERR

FRE(-3) and Overlays

Using FRE(-3) in a compiled program is no longer supported and will return the error message "Feature Unavailable."

GET, PUT, SADD, SWAP, VARSEG, VARPTR$

Visual Basic permits you to use form variables with these statements and functions, but such use is not meaningful and will cause unpredictable results. For example:

SUB ChangeCaption (X AS FORM)

DEF SEG = VARSEG (X)                 ' May cause system to stop.
' Other code ommitted.

END SUB

Using MSGBOX, INPUTBOX$ with Existing Code

By default, these statements display the default form background pattern. To preserve your screen, set the ControlPanel(DESKTOP_PATTERN) property. For example:

LOCATE 10, 10 : PRINT "Preserve this text"

SCREEN.ControlPanel(7) = 0                           ' 7 =

DESKTOP_PATTERN MSGBOX "This is displayed without blanking screen."

OPTION EXPLICIT and Immediate Window

If your program uses OPTION EXPLICIT, you must declare any variables used in the Immediate window. For example:

DIM i%: FOR i% = 1 to 10: PRINT i%: NEXT

1.4 LINK

The Microsoft Segment-Executable Linker (LINK) can make use of a DPMI server such as 386MAX or Windows enhanced mode. LINK runs fine without a DPMI server, however. If it cannot locate a DPMI server, LINK displays a warning message and then executes in real mode.

1.5 Hardware Considerations

Phantom Drive Support

Accessing the phantom drive (drive B on a single-floppy system) when forms are showing on the screen causes the operating system to print the message "Insert diskette for drive B: and press any key when ready" if the B drive is not considered active. This message is printed on top of any visible forms at the current cursor location. To respond to this message and allow the operating system to continue, the user must ensure the drive door is closed and then press any key.

Your program cannot trap this message using error handling, but you can intercept problems before they occur by searching a drive list box for the "B:" specification and then prohibiting your program from switching to the B: drive if it is not present. For example, the following code uses a drive list box (Drive1) to check if a B: drive exists and sets a flag to TRUE if it does:

' Module level.

DIM SHARED BFlag AS INTEGER

SUB Form_Load ( )

  FOR i% = 0 to Drive1.ListCount
    IF INSTR(Drive1.List(i%), "B:") THEN BFlag = TRUE
  NEXT

END SUB

Invalid Drive on Start-Up

Make sure the current drive is valid (the drive exists and contains a disk) before starting VBDOS, FD, or running an application with a directory list in the programming environment. If the drive is not valid, you may receive an "Out of memory" error message.

French Keyboards

In the Form Designer, the M accelerator key does not work if your cursor is in an edit field.

In the programming environment, bookmarks do not work correctly with this keyboard driver.

Monochrome Monitors

Some systems with monochrome monitors may not display the programming environment and Form Designer correctly. Applications created with Visual Basic will display correctly on these systems, however.

ATI Ultra VGA Video Cards

Systems with this card may wrap the first character of print output to the end of the preceding line in screen mode 10.

InColor Hercules Video Cards

The programming environment and the Form Designer display in black and white on systems with this card. In addition, text box controls do not display a cursor on these systems.

SCREEN 13 with SpeedStar VGA Video Cards

Screen mode 13 causes display anomalies on the output screen with SpeedStar VGA video cards. This occurs when displaying the output screen with F4 and when stepping through an application in the programming environment.

Aspect Ratio with Wyse EGA and CGA Video Cards

Use an aspect ratio of 1.2 when drawing circles on Wyse EGA and CGA video cards to make circles appear round.

1.6 TRNSLATE.EXE

For specific information on language differences between Visual Basic for Windows and Visual Basic for MS-DOS, see the "Programmer's Guide" appendixes E, G, H, and I and the file COMPAT.TXT.

VBDOS.EXE, VB.EXE, and FT.EXE

All of these executables must be in directories in your PATH environment variable when you run TRNSLATE.EXE.

Character Mappings

TRNSLATE.EXE and FT.EXE do not map extended ASCII characters (>128) to their ANSI equivalents and vice versa. For this reason, it is a good idea to replace extended characters, such as umlauts, with non- extended characters before converting your application.

Note that using extended ANSI characters in a form or control name in Visual Basic for Windows results in an invalid form or control name in Visual Basic for MS-DOS.

Part 2: Corrections to "Microsoft Visual Basic Programmer's Guide"

Page    Section\Note
----    ------------

xvii    Sample Applications
        -------------------
        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.*.

200     Table at Top of Page
        --------------------
        "ir1_Click" should be "Dir1_Click".

490     Using Extended and Expanded Memory
        ----------------------------------
        The last part of the second paragraph should read "and 0K of
XMS
        for the programming environment."

497     Memory Map Table
        ----------------
        As noted previously in this file, quoted string literals are
        stored in Far Heap, not Near Heap (DGROUP).

519     Language Summary, ALIAS Keyword
        -------------------------------
        The ALIAS keyword is available in Visual Basic for Windows.

534     Language Summary, 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.

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.

564     Adding Code to Load the Form
        ----------------------------
        The code that loads the form should be:

        CASE "B"
          frmSTUDENT.SHOW 1

Part 3: Corrections to "Microsoft Visual Basic Reference"

Page    Section\Note
----    ------------

iii     Document Conventions
        --------------------
        Keywords are shown in normal, uppercase in tables. Not bold.
        Keywords and literals are bold in syntax.

 29     AutoRedraw Example
        ------------------
        The third sentence that introduces the example should read
        "Print output on the form is retained when the form displays
        since AutoRedraw is True." It is important to set AutoRedraw
        to True if you want to display output printed to the form
        during the Load event.

 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.

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."

145     ERR Statement
        -------------
        The value of n% cannot be >255.

170     FORMAT$ Function
        ----------------
        The formating characters for fmt$ are omitted. See online Help
        for this information.

201     $INCLUDE Syntax
        ---------------
        The syntax for the $INCLUDE metacommand is as follows:

        {' | REM}$INCLUDE: 'filespec'

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

251,    LPRINT, PRINT, PRINT #
329,    ----------------------
330     You can't use the comma with the USING clause in any of these
        statements or methods.

259     Menu Control
        ------------
        There is no DropDown event for menu controls.

273     MSGBOX Function
        ---------------
        The last line of example text should read:

        x% = MSGBOX(Msg$)

331     PRINT Statement
        ---------------
        The PRINT statement documentation is included under the LPRINT
        statment.

351     SCREEN Object
        -------------
        AutoRedraw does not apply to the SCREEN object.

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.

440     Scan Code Table
        ---------------
        The scan code for decimal 78 is the gray "+" key, not "-" as
        shown.

Part 4: Corrections to Online Help

Creating a Control Array

Steps 2 and 3 in this procedure are functionally redundant. Setting the Index property to 0 creates the control as an element of a control array, as does giving two controls the same CtlName property at design time.

Save File As

You can save forms in text format.

Scan Code Table

The table is missing these entries:

Key Code --- ----

Esc      1
A       30
F1      59

AutoRedraw Property

This property does not apply to the SCREEN object.

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.

ERR Statement

The value of n% cannot be > 255.

INPUTBOX$ Function Details

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

Menu Control Details

There is no DropDown event for menu controls.

SCREEN Object Summary

The AutoRedraw property does not apply to the SCREEN object.


Additional reference words: VBmsdos 1.00 readme

KBCategory: kbreadme
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 21, 1995
©1997 Microsoft Corporation. All rights reserved. Legal Notices.