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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customizing VFP System Menu 1

Status
Not open for further replies.

RichardH

Programmer
Apr 21, 2001
46
US
I am posting this again because I didn't get an answer that worked last time I posted it. I hope that doesn't mean it is impossible.

I want to customize the View portion for the VFP System Menu that is diplayed when my users modify reports. I don't want them to be able to Preview reports from the Report Designer screen. I will let them Preview the reports before they print but not from the Design screen.

What I want to change is the View Menu that Displays in the Report Designer screen. The default choices are:
-Design
-Preview
-Data Enviroment
-Report Controls Toolbar
-Layout Toolbar
_Palette Toolbar
-Grid Lines
-Show Position

I want to remove -Preview and -Data Enviroment from that menu. I know how to modify other portions of the SYSTEM MENU and about SYS(2013) that displays the names of the menu bars, but it doesn't include the items on the View menu. Hopefully there is a way to do that. Thanks..
 
Hi my friend,
I see you really need this to work. well, just to make it clear in my mind, Your users use the normal VFP IDE meaning they installed Visal Fox Pro [if yes, which version?]?
Or they use a program you developed for them with VFP?
Thanks Walid Magd
Engwam@Hotmail.com
 
Yes, I would very much like to solve this one. They are using a program that I developed with Visual Foxpro 6.

Richard Hilton
rick@museumsoftware.com
 
Create your own toolbar "MyView". For this
===========================================
Creating MyView Toolbar >>>>>>>>>

From the View menu, choose Toolbars.

Choose New.

In the New Toolbar dialog box, name the toolbar as MyView

Add buttons to the toolbar by selecting a category in the Customize Toolbar dialog box and then dragging the appropriate buttons onto the 'MyView' toolbar.(I suggest you choose the Report Category and leave out the DataEnvironment Button and add the rest.)

You can rearrange buttons on the toolbar by dragging them to the desired position.

Complete the toolbar by choosing Close in the Customize Toolbar dialog box and then closing the toolbar window.

Note You cannot reset buttons on a toolbar you create. So if needed you have delete and recreate.
===========================================
Now how do we use it ?

In your programme issue the following command to first remove the View Pad of SystemMenu

RELEASE PAD _mView OF _mSysMenu

SHOW WINDOW MyView
===========================================
After the Job... to reset the SYSTEM MENU
SET SYSMENU TO DEFAULT
===========================================
Also note the Users can close the MyView window accidentaly and so loose the MyView Tool Bar. So probably you can have a ON KEY LABEL Ctrl+V DO ShowMyView, And then suitably include the SHOW WINDOW MyView in that routine.
==========================================
Hope this is helpful to you.

The whole reading looks big, but the real job is very small.. Best of luck ramani :)
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
A nice readable summary of how to do something I've been meaning to learn how to do. Now I just hope it works right when I try it! :cool: Dave
 
OK. Many thanks to ramani for providing the perfect solution to creating the custom toolbar. But now I need to include it in my VFP6 distibuted application and can't quite figure it out. I am using a special foxuser file (myfoxuser.dbf/fpt) and use the command:

set resouce to myfoxuser

I enter the above command in the command window before I create the custom toolbar and also include the command in the startup code of the applicaion.

It works great in the development version until I close and restart VFP. Then the toolbar has to be recreated.

For the application, I include the myfoxuser.dbf/fpt in the application by copying the two files into the startup folder of the application, but it still doesn't work, ie.. the toolbar I created does not exist.

Any ideas? Thanks.
 
In the development environment, start the VFP and proceed upto SHOW WINDOW MyView with the default FoxUser resource files.
1. Then minimise the VFP
2. Issue the ? SYS(2005) from command window and note down the FoxUser Resource file used by you with full path.
3. Open the Windows Browser and locate the resource files noted in 2.
4. Mark this as 'Read Only' (by right clicking mouse over these files and selecting property and selecting READ ONLY)
- Remember to set this for both the Foxuser.DBF and FoxUser.FPT.
5. Now close the browser / close the VFP as well.
6. Now copy this FoxUser.* and put it in your application directory as READONLY files (as FoxUser.* only).
7. For your development work, remember to reset the READONLY attribute back to normal in the VFP directory.

With these set, the application run will work fine.. I hope :)

Ramani :) ramani :)
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Ramani, thanks again for the excellent detailed answer. With your help, I have solved this nasty problem, well almost. When I copy the Foxuser.dbf/fpt files onto a computer with the distibuted application it works great as long as the machine is running Win98, but with Win2000 it doesn't work.

I haven't tried reinstalling the entire application on the Win2000 computer since removing programs from a Win2000 machine is a whole other problem. Do you have any more ideas??
 
Just out of curiosity, is this a Win2000 computer with the new sort of NTlike FAT? (As opposed to a system you upgraded from Win9x and left the old FAT arrangement on.) If so then there may be an incompatability there. But I don't know what to do about it. --Dave

 
The computer was running Win98, but when Win2000 was installed everything on the harddrive was erased and I am pretty sure the new NT FAT was installed.
 
I am pretty sure the new NT FAT was installed.

I believe that the NT type FAT uses 64 bits vs 32 in the Win9x FAT, so the Sys(2005) Ramani had you get might not be the proper path to use in the new system. But as I said, I don't know enough to point you in the right direction for sure. -- Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top