Microsoft KB Archive/57883

= UI Toolbox Menu Bar with Menu Past 64th Column Shows Garbage =

Article ID: 57883

Article Last Modified on 11/21/2006



This article was previously published under Q57883



SYMPTOMS
The User Interface (UI) Toolbox shipped with Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 incorrectly processes menu bars when the last menu item starts in the 64th or higher column. The symptom of this errant behavior is that garbage characters are displayed on the screen after that menu is deselected.



STATUS
Microsoft has confirmed this to be a bug in Microsoft Basic PDS versions 7.00 and 7.10 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. A correction for this problem in MENU.BAS is shown below.



MORE INFORMATION
To correct the source code, MENU.BAS, so that it will handle longer menu bars correctly, change the following IF statement (found after the &quot;menuDoShowPullDown&quot; label near the end of the MenuDo SUB) LEN(GloTitle(currMenu).text) to LEN(RTRIM$(GloTitle(currMenu).text)) in both of the following places: IF GloTitle(currMenu).rColItem - GloTitle(currMenu).lColItem _ < LEN(GloTitle(currMenu).text) THEN GloTitle(currMenu).rColItem = _ GloTitle(currMenu).lColItem + LEN(GloTitle(currMenu).text) END IF NOTE: The underscore (_) characters above indicate line continuation to fit in this article. This block IF is actually on three long lines in the original source.

The changed code is as follows: IF GloTitle(currMenu).rColItem - GloTitle(currMenu).lColItem _ < LEN(RTRIM$(GloTitle(currMenu).text)) THEN GloTitle(currMenu).rColItem = _ GloTitle(currMenu).lColItem + LEN(RTRIM$(GloTitle(currMenu).text)) END IF This correction should be made and the libraries rebuilt to enable correct handling of menus beginning past the 64th column.

The above correction is the same as for a separate article describing a different symptom, where the mouse-selectable area for narrow menus is too wide. To find this and other problems with the User Interface Toolbox, query in this Knowledge Base on the following keywords:

user and interface and toolbox and buglist7.00

Additional query words: BasicCom SR# S900112-171 buglist7.00 buglist7.10

Keywords: KB57883

-

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

© Microsoft Corporation. All rights reserved.