Re: Close system toolbar of foxpro
Christof Wollenhaupt
Hi Sanj,
There are several options. If you only want to remove the button entirely, you can create a new FOXUSER file with a modified toolbar definition:
1) Make a copy of your current FOXUSER.DBF named NewFoxUser.DBF and activate it with:
SET RESOURCE TO NewFoxUser.DBF
2) Open the report preview and make the preview toolbar visible.
3) Hold down the ALT key. Click on the exit button and drag it off the toolbar. Release the ALT key.
4) Switch back to the old FOXUSER.DBF with
SET RESOURCE TO FoxUser.DBF
5) Open the new foxuser file and delete all records with:
SET DELETED OFF
DELETE ALL
6) Now locate the record that contains the report toolbar definition and recall this one:
Locate for ID="TTOOLBAR" and name="Print Preview"
Recall next 1
7) Pack the file, copy the file into your applications directory and rename it to Preview.DBF.
8) Include the Preview.DBF in your project and mark it as include. In your application, before you preview a report, issue the following statement. This activates the modified preview toolbar definition:
SET RESOURCE TO Preview.DBF
After previewing a report, you can switch back to the previous resource file.
Nonetheless, updating to VFP 9 or VFP 8 is still a good idea. Compared to VFP 6 there are so many enhancements in these versions that are worth much more than the upgrade price.