DOCUMENT:Q135517 25-AUG-1999 [foxpro] TITLE :How to Attach a Menu to a Form PRODUCT :Microsoft FoxPro PROD/VER: OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 ------------------------------------------------------------------------------- SUMMARY ======= This article shows by example how to add a menu to a Visual FoxPro form so that the menu appears on the form rather than in the default position across the top of the screen. MORE INFORMATION ================ In Visual FoxPro, menus are not objects that can be instantiated (created) on or in a form. Nevertheless, you can add a menu directly to the form so that it appears on the form underneath the title bar rather than in the default system menu position across the top of the screen. To do this, use the DEFINE MENU command as shown in the following example. Step-by-Step Example -------------------- 1. Create a form named Form1. 2. In the Activate event procedure for the form, include the following code to define the menu bar, and menu lists. Include the ACTIVATE MENU command. CLEAR SET SYSMENU SAVE SET SYSMENU TO ON KEY LABEL ESC KEYBOARD CHR(13) DEFINE MENU example BAR in window FORM1 DEFINE PAD convpad OF example PROMPT '\