Microsoft KB Archive/71791

= &quot;Menu Bar Longer Than Screen!&quot; Without MenuInit in UI Toolbox =

Article ID: 71791

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 Q71791



SUMMARY
When you use the User Interface (UI) Toolbox menu functions, if you don't properly initialized the menus, the message &quot;Menu bar longer than screen! Cannot continue!&quot; will display.

To avoid this error, be sure to call &quot;MenuInit&quot; before running any other menu commands.

This information applies to the User Interface Toolbox of Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS.



MORE INFORMATION
The following program demonstrates how the error can be generated:

Code Sample
'$INCLUDE: 'general.bi' '$INCLUDE: 'mouse.bi' '$INCLUDE: 'window.bi' '$INCLUDE: 'menu.bi'

COMMON SHARED /uitools/ GloMenu          AS MenuMiscType COMMON SHARED /uitools/ GloTitle       AS MenuTitleType COMMON SHARED /uitools/ GloItem        AS MenuItemType COMMON SHARED /uitools/ GloWindow      AS windowType COMMON SHARED /uitools/ GloButton      AS buttonType COMMON SHARED /uitools/ GloEdit        AS EditFieldType COMMON SHARED /uitools/ GloStorage       AS WindowStorageType COMMON SHARED /uitools/ GloWindowStack AS INTEGER COMMON SHARED /uitools/ GloBuffer$

DIM GloTitle(MAXMENU)          AS MenuTitleType DIM GloItem(MAXMENU, MAXITEM)  AS MenuItemType DIM GloWindow(MAXWINDOW)       AS windowType DIM GloButton(MAXBUTTON)       AS buttonType DIM GloEdit(MAXEDITFIELD)      AS EditFieldType DIM GloWindowStack(MAXWINDOW)  AS INTEGER DIM GloBuffer$(MAXWINDOW + 1, 2)

' To correct the &quot;Menu bar longer than screen! Cannot continue!&quot; ' error, invoke 'MenuInit' here... MenuSet 1, 0, 1, &quot;menu&quot;, 5 MenuPreProcess

Additional query words: BasicCom

Keywords: KB71791

-

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

© Microsoft Corporation. All rights reserved.