locked
Close button on Print Preview toolbar RRS feed

  • Question

  • 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.

    Thanks,
    Sanj.
    Wednesday, August 10, 2005 5:42 PM

Answers

  • 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 

    Wednesday, August 10, 2005 11:39 PM
  • 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.
    Sunday, August 14, 2005 2:17 PM

All replies

  • 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 

    Wednesday, August 10, 2005 11:39 PM
  • 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.
    Sunday, August 14, 2005 2:17 PM
  •  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 ] )

      ENDIF

    ENDFOR

    Monday, October 15, 2007 5:44 PM
  • Hi 

    thanks for your answer
    I have the VFP9 SP2, English, winxp in spanish


    I removed the print button to print the bar, running from the environment vfp no problem not displayed (the title bar is Print Preview), but when I create the executable title bar and displays out in Spanish print button (Vista Preliminar), I used the SET REPORTBEHAVIOR 80 and nothing, any suggestions


    programing
    Wednesday, October 6, 2010 11:36 PM
  • Hi Hebert,

    woa you reactivated a thread from 2005... cool! ;) 

    Regarding your problem: Did you really followed all the steps, especially  7 and 8 ?

     


    wOOdy
    Microsoft Visual FoxPro Technology Advisor
    Microsoft "Most Valuable Professional" from 1996 to 2009
    Visit my XING profile! Don't know what XING is?

    *´¨)
    ¸.·´¸.·*´¨) ¸.·*¨)
    (¸.·´. (¸.·` *
    .·`.Visual FoxPro: It's magic !
    (¸.·``··*


     

    Thursday, October 7, 2010 7:18 AM
  • Hi Jurgen

    I made every step, but in my FoxUser.dbf in field NAME appeared less "Vista preliminar"  not "Print Preview", there was a syntax for: (Locate for id = "TToolBar" and name = "Vista preliminar"), and as usual only run from The environment is ok,, when generating the exe file shows the printer icon.

    In the memo field data values appear in Spanish

    try to delete the part about printing anything.

    try to delete the print and nothing.

    Could you send me the file and preview.dbf  fpt .

    maybe the error  is the English-Spanish version

    hebert_h (@) hotmail . com

    thanks 


    programing
    Saturday, October 16, 2010 7:35 PM
  • Hi Hebert,

    The window names are locaized, that's why you see that "Vista" instead of th regular english description. But this should also work at runtime,. Are you sure that you have copied the spanish runtime language dll at the target computer?

    That special foxuser could contain  a record for each language.To switch your development IDE to a different language just use the commandline parameter -L (see help for more). The Windows Linkfile would then contain something like this:

    c:\Develop\FoxPro\VFP9\vfp9.exe -Lc:\Develop\FoxPro\VFP9\vfp9ENU.dll

    As you can see, I have installed into "c:\develop\FoxPro\VFP9", and after the exe a "-L" follows and without any space the full path to the needed language dll is added.

    Now you can create a FoxUser with the english names.

    BTW: When I tried to recreate your problem, I realized that I don't have a spanish Resource-dll for the IDE, only for the runtime. Where did you got that from?

     


    wOOdy
    Microsoft Visual FoxPro Technology Advisor
    Microsoft "Most Valuable Professional" from 1996 to 2009
    Visit my XING profile! Don't know what XING is?

    *´¨)
    ¸.·´¸.·*´¨) ¸.·*¨)
    (¸.·´. (¸.·` *
    .·`.Visual FoxPro: It's magic !
    (¸.·``··*


     

    Sunday, October 17, 2010 8:21 AM
  • Hi Jurgen

    I think that is the version of O.S.

    I have in my pc winxp (in Spanish), but on my laptop I have win. 7 in English and everything works ok, even pass the compilation, the FOXUSER and preview to the pc and does not work, the title bar reappears in Spanish (Vista Previa)and displays the print icon.

    I am in Peru, my clients have O.S. in Spanish

    ??


    programing
    Saturday, October 23, 2010 11:26 PM
  • hi


    solved, create a FoxUser.dbf in all-Spanish version of a portable vfp, rename the file and copy it to the folder with the executable in English

     

    tx


    programing
    Thursday, October 28, 2010 12:19 AM