Microsoft KB Archive/73695

= List Box in Basic PDS UI Toolbox Shows Focus Incorrectly =

Article ID: 73695

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q73695



SYMPTOMS
Within the User Interface (UI) Toolbox, toggling between the buttons of the list box will at times highlight the incorrect item that has the focus. When the CANCEL button is highlighted and you press the TAB key, focus is set correctly to the list box, yet the OK button is incorrectly highlighted. This may give you the false impression that you can only select the list box with the mouse and not the keyboard. By changing the code in WINDOW.BAS, you can correct this problem as shown below.



STATUS
Microsoft has confirmed this to be a bug in the User Interface (UI) Toolbox provided with Microsoft Basic Professional Development System (PDS) for MS-DOS, versions 7.0 and 7.1. A correction to this problem is provided below.



MORE INFORMATION
To correct the problem, do the following:  Load WINDOW.BAS into the QBX.EXE environment.  Search for the LISTBOX function. The LISTBOX function is declared as follows: FUNCTION LISTBOX (text$, MaxRec)  Locate the case statement within the LISTBOX function.  Case 7 is documented in the following manner: CASE 7 SELECT CASE currButton CASE 0 currButton = 2 CASE 2 ButtonToggle 2 ButtonToggle 3 currButton = 3 CASE 3 ButtonToggle 2 ButtonToggle 3 currButton = 0 END SELECT Change the case statement so that it reads: CASE 7 SELECT CASE currButton CASE 0 ButtonToggle 2 currButton = 2 CASE 2 ButtonToggle 2 ButtonToggle 3 currButton = 3 CASE 3 ButtonToggle 3 currButton = 0 END SELECT 

When you make the above change, you must also change the following (near the top of WINDOW.BAS): ButtonOpen 2, 2, &quot;OK&quot;, 16, 6, 0, 0, 1 to the following instead: ButtonOpen 2, 1, &quot;OK&quot;, 16, 6, 0, 0, 1 The program is now corrected. To use the correct version of WINDOW.BAS, you will need to make a new UITBEFR.LIB and UITBEFR.QLB. Run the following commands at the MS-DOS prompt or from a batch file. Be sure that your path is correctly set to access the LIB.EXE, BC.EXE, and the LINK.EXE files included in the Microsoft Basic PDS. Make sure that QBXQLB.LIB and QBX.LIB are in the directory in which you are working, or that they are accessible with your LIB environment variable in MS-DOS. UIASM.OBJ must also be in your working directory. bc /x/fs general.bas; bc /x/fs window.bas; bc /x/fs mouse.bas; bc /x/fs menu.bas; lib uitbefr.lib+ general+ mouse+ window+ menu+ uiasm+ qbx.lib; link /q uitbefr.lib, uitbefr.qlb,,qbxqlb.lib;

Additional query words: BasicCom buglist7.00 buglist7.10 7.00 7.10

Keywords: KB73695

-

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

© Microsoft Corporation. All rights reserved.