Can you modify the Close button on Print Preview toolbar in Visual Foxpro 6.0.
I need to remove the picture of Close button and put the text "CLOSE" on the button.
can you do this in VFP 6.0

Please help.


Re: Close system toolbar of foxpro

Cameron Slade

Hi Sanj,

I have good news and bad news ;-).  The bad new is there isn't a way to do this in VFP 6.0.  The good news is it is possible in VFP 9.

Sorry I couldn't be more help,
Cameron Slade
VS Data Test Manager 

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:


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


5) Open the new foxuser file and delete all records with:


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:


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.

Re: Close system toolbar of foxpro

c y h

Re: Close system toolbar of foxpro


c y h wrote:

I use foxpro 5.0, is there any way to remove the system toolbar

by writing a short program

I am not Christof, but here goes:

LOCAL lnCount,

LOCAL ARRAY laToolbars

DIMENSION laToolBars[ 11, 2 ]

*** Initialize array property with VFP system toolbars

*** and a flag to indicate whether or not they are visible

laToolbars[ 1, 1 ] = 'Form Designer'

laToolbars[ 2, 1 ] = 'Standard'

laToolbars[ 3, 1 ] = 'Layout'

laToolbars[ 4, 1 ] = 'Query Designer'

laToolbars[ 5, 1 ] = 'View Designer'

laToolbars[ 6, 1 ] = 'Color Designer'

laToolbars[ 7, 1 ] = 'Form Designer'

laToolbars[ 8, 1 ] = 'Database Designer'

laToolbars[ 9, 1 ] = 'Report Designer'

laToolbars[ 10, 1 ] = 'Report Controls'

laToolbars[ 11, 1 ] = 'Print Preview'

FOR lnCount = 1 TO ALEN( laToolbars, 1 )

laToolBars[ lnCount, 2 ] = WVISIBLE( laToolbars[ lnCount, 1 ] )

IF WVISIBLE( laToolbars[ lnCount, 1 ] )

HIDE WINDOW ( laToolbars[ lnCount, 1 ] )