PROCEDURE PASSCHG PUSH KEY CLEAR HIDE MENU Main_Menu HIDE POPUP ALL SET CURSOR OFF Hold_Pass = _Password***************************************************************************************************
PUBLIC Main_Menu,RegMenus ... Main_Menu = "_mSysMenu" ... _EXIT = .F. DO WHILE _EXIT = .F. _EXIT = .T. DO Mainpops WITH _EXIT ENDDO DEACTIVATE MENU Main_Menu RELEASE MENU Main_Menu EXTENDED SET SYSMENU TO DEFAULTand in Mainpops.prg
PROCEDURE MAINPOPS PARAMETER _EXITPOS CLEAR *main_menu = "Main_Menu" SET SYSMENU TO main_menu = "_mSysMenu" 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" *!* DEFINE PAD _Cash_Reg OF Main_Menu PROMPT "Cash Register " AT 0,0; *!* COLOR SCHEME 3 KEY ALT+C, "" FONT 'Fixedsys', 10 *!* DEFINE PAD _Inventory OF Main_Menu PROMPT "Inventory " AT 0,18; *!* COLOR SCHEME 3 KEY ALT+I, "" FONT 'Fixedsys', 10 *!* DEFINE PAD _Utilities OF Main_Menu PROMPT "\<Utilities " AT 0,32; *!* COLOR SCHEME 3 KEY ALT+U, "" FONT 'Fixedsys', 10 *!* DEFINE PAD _Exit OF Main_Menu PROMPT "E\<xit " AT 0,46; *!* COLOR SCHEME 3 KEY ALT+X, "" FONT 'Fixedsys', 10 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 .... ACTIVATE MENU &Main_Menu _EXITPOS = .F. RETURNThis older code would work, but if you clicked outside the program, like on on the Taskbar, or the desktop, the window of this program starts to flicker (the Menu flickers).....but it still works ok when you click on the program and on the Menu.