Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

system menu removal

Status
Not open for further replies.

shahidmasoud

Programmer
Dec 22, 2011
2
BH
Hi, all
I am using system default menu in vfp9 sp2, I want to remove and
add menu elements user wise.
Can I get some idea to do this.
At the moment I am using skip for to enable and disable any
menu element.

Regars,
SHAHID
 
Are you meaning that for an application which you are creating you want to create and use a 'custom' menu?

Or do you mean something else?

If the later, then more clarification on how/where you will use the new 'custom' menu would help us give you better focused advice.

If the former then it involves a number of steps.
* Create the VFP Menu
* Handle the READ EVENTS
* Integrate into Project
* Compile Project into EXE
* etc.

You might want to look over the free on-line VFP tutorial videos labeled: Creating System Menus and/or Building a Simple Application at:

Good Luck,
JRB-Bldr
 
Dear JRB-Bldr,
Thanks for your reply, I have already developed a system based on
vfp9 sp2, it is having system defined menu. I want to use user
rights to remove some menu elements from system menu, user wise.
At the moment it is capable of disbling menu bars only.
What should i do to remove some menu bars at run time.
Regards,
SHAHID
 
Shahid,

You say that you are currently disabling the unwanted menu items (using SKIP FOR). Is there any reason why you don't want to continue to do that? It would be simpler than removing the items in question.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I want to use user rights to remove some menu elements from system menu

As Mike has suggested above, you do not REMOVE Menu elements.
Instead you DISABLE them.

Typically your users would be assigned some UserRight after they enter the application.
A couple of ways this can be done might be through a Login process or through a Lookup table using their Windows username.

Regardless of how that is assigned, a simplistic way to DISABLE menu items would be to put the appropriate logic into the Menu Item's separate OPTIONS - SKIP.

Then, if the individual User's UserRights were such that they made the SKIP FOR logic TRUE, then the Menu Item would be DISABLED.

Good Luck,
JRB-Bldr
 
The GenmenuX *:IF directive is slicker than snot.

Hightly recommended!

(And there's a bunch of other useful stuff in there too.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top