Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu weirdness
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01367001
Message ID:
01367007
Views:
11
Right.

>If I not missing something, I think you need to change it to something like
>
>DO Mainpops
>READ EVENTS
>
>
>And on selecting "Exit" from the menu do a CLEAR EVENTS
>
>
>>Hi Gang!
>>
>>Here is a weird problem I ran across in an older application that I need to fix.
>>
>>In this POS app, there is a startup program call pos_strt.prg
>>
>>This is a bit of the code in pos_strt...
>>
>>
>>_EXIT = .F.
>>DO WHILE _EXIT = .F.
>>	_EXIT = .T.
>>	DO Mainpops WITH _EXIT
>>*TMT 12/12/08
>>ENDDO
>>
>>
>>It'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.
>>
>>Here is the code in Mainpops.prg
>>
>>
>>******************************************************
>>*******************************************************************
>>*  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.
>>
>>RETURN
>>
>>
>>This 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.
>>
>>Ok.... so far so good.
>>
>>If the app has the focus, then the CPU Usage is around 2 or 3 %.
>>
>>However, when a user switches away from the App to another application, the CPU usage of the App goes through the Roof !! around 98% !!!. For some reason, the Mainpops is not being done properly, and is being exited, and the loop in Pos_strt is running like crazy!!!
>>
>>Worse, if you minimize the App to the TaskBar, the same thing happens, but you CANNOT Maximize the app anymore!!!
>>
>>Weird....
>>
>>Any ideas????
>>
>>Thanks!
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform