DOCUMENT:Q156266 14-DEC-1999 [foxpro] TITLE :BUG: Adding Menu Shifts Controls and Reduces SDI Form Height PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:5.0,5.0a,6.0 OPER/SYS: KEYWORDS:kbprogramming kbtool kbui kbvfp kbvfp500aBUGkbbuglist ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a, 6.0 ------------------------------------------------------------------------------- SYMPTOMS ======== When a menu is added to a Single-Document Interface (SDI) form, the Height of the form is reduced by the height of the menu. The window size remains the same, but all the controls shift downward, causing some controls to be moved partially or fully off the bottom of the form. WORKAROUND ========== After adding the menu, increase the form Height by adding the menu height to it. -or- After adding the menu, reduce the Top property of all controls contained in the form by subtracting the menu height. STATUS ====== Microsoft Microsoft has confirmed this problem in the products listed above and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a new menu. Make it a Menu rather than a Shortcut. 2. On the Menu menu, click Quick Menu to create a default quick menu. 3. On the View menu, click General Options. In the General Options dialog box, select the Top-Level Form check box, then click OK. 4. On the Menu menu, click Generate. Save the menu as Testmenu, then select the Generate button to generate the default .mpr file. 5. Run the following code from a program (.prg) file: * Start of code example * PUBLIC oform1 oform1=CREATEOBJECT("form1") oform1.SHOW RETURN DEFINE CLASS form1 AS FORM HEIGHT = 210 WIDTH = 387 SHOWWINDOW = 2 AUTOCENTER = .T. CAPTION = "SDI form with Menu" ADD OBJECT command1 AS COMMANDBUTTON WITH ; TOP = 180, ; LEFT = 144, ; HEIGHT = 27, ; WIDTH = 84, ; CAPTION = "E\