Microsoft KB Archive/57884
Article ID: 57884
Article Last Modified on 11/21/2006
This article was previously published under Q57884
The ListBox FUNCTION in the User Interface (UI) toolbox WINDOW.BAS file provided with Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 does not behave correctly when a list box is first activated. On initialization, the keyboard cursor is set on the OK button instead of in the list box.
Without the modification listed below, you must press the TAB key twice before using the cursor keys to move into the list box.
Microsoft has confirmed this to be a bug in Microsoft Basic PDS versions 7.0 and 7.1 for MS-DOS. A correction is provided below.
To correct this behavior, the initial value of currButton (set early in the ListBox FUNCTION) must be changed from 2 to 0 to let the list box be the default choice. When you do this, you will be able to use the cursor keys to highlight your choice, and then press ENTER to select the choice. To cancel your selection, press the TAB key twice to select the CANCEL button, and then press ENTER.
To make the necessary modifications to WINDOW.BAS, follow these steps:
- Load WINDOW.BAS into QBX.EXE.
- View the SUB ListBox.
- Move to line 18 ('currButton = 2').
- Change the 2 to a 0 (zero). (It should read "currButton = 0".)
- Follow the instructions at the beginning of GENERAL.BAS to create a new library and Quick library with this modification.
For more information about problems with the UI Toolbox, query on the following words in the Microsoft Knowledge Base:
User and Interface and Toolbox and buglist7.00
Additional query words: BasicCom buglist7.00 buglist7.10 7.00 7.10