_EXIT = .F. DO WHILE _EXIT = .F. _EXIT = .T. DO Mainpops WITH _EXIT *TMT 12/12/08 ENDDOIt's job is to create a system menu and wait until the user exits the menu, then loop back and create a brand new menu to use.... or to exit out.
****************************************************** ******************************************************************* * Description: This program will create the POS menu that appears * at the top of the screen, it will also cycle back * after every selection is completed. ******************************************************************* PROCEDURE MAINPOPS PARAMETER _EXITPOS CLEAR *main_menu = "Main_Menu" SET SYSMENU TO *SET SYSMENU automatic main_menu = "_mSysMenu" *DEFINE MENU &Main_Menu BAR AT LINE 1 DEFINE MENU &Main_Menu DEFINE PAD _Cash_Reg OF &Main_Menu PROMPT "\<Cash Register" DEFINE PAD _Inventory OF &Main_Menu PROMPT "\<Inventory" DEFINE PAD _Utilities OF &Main_Menu PROMPT "\<Utilities" DEFINE PAD _Exit OF &Main_Menu PROMPT "E\<xit" ON SELECTION PAD _Cash_Reg OF &Main_Menu DO Regtemp ON PAD _Inventory OF &Main_Menu ACTIVATE POPUP Inventory ON PAD _Utilities OF &Main_Menu ACTIVATE POPUP Utilities ON SELECTION PAD _Exit OF &Main_Menu RETURN ******************************************************************* -SNIP- ACTIVATE MENU &Main_Menu _EXITPOS = .F. RETURNThis is the Menu. If the user selects to exit, then a RETURN is done while _EXITPOS is still True, so the loop up above exits.