I am having problem with the menu in my application only in Development
environment. When I create EXE file and run then it works without a hitch.
I have over 130 menu items that comprise of 8 at the menu bar level and
remaining are submenus of these 8 main menu items. The application is a
multi-user application and I need to enable/disable menu items depending on
each user's access levels. The user access levels are stored in a dbf file. I
am achieving this by placing an expression in SKIPFOR field of the
mainmenu.mnx file. Here is the relevant code:
SKIPFOR field -> ifuseraccess(cUserid,prompt)
Function IfUserAccess(cUser,cPrompt)
Local nCurarea,lFound
if cUser=='SUPERMAN' && For SUPERMAN, all options are enabled.
lFound=.t.
else
nCurarea=select(0)
usefile('useraccess')
select Useraccess
set order to 1
lFound=seek(cUser+cPrompt)
select (nCurarea)
endif
Return lFound
The problem is that as long as I populate the SKIPFOR field for about 50
items or so, it works with no problem. As soon as I go upto 60 items or more
and run the application, the main menu bar displays fine but when I click on
any of the items on the menu bar, it doesn't show the dropdown menu. I have
to repeatedly click on a menu item for show its dropdown items. Once the
dropdown is displayed for one menu bar item, I can slide left or right to
other items and the dropdown menu will show but if I move the mouse away from
the menu bar and try to go back again I run into the same problem. It appears
to be a speed issue but I am not sure. The compiled EXE file works absolutely
fine.
I am using VFP 6.0 on a PIII 900 mhz. machine under XP PRO, Enterprise
edition.
I will appreciate suggestions from the experts here as this problem is
really annoying and slowing down my development process.
Thanks.