Kurt Wendt wrote on 2012-10-09: 
>  Tracy,
>  
>  Would running your program be about the same thing - that I would have
>  to remember to run the tool on the report? I suspect so.
>  
>  Is it possible - within VFP7 - to Add something to the Menu system? Like
>  under TOOLS?
>  
>  Thanks again,
>  -K-
>  

Kurt,

You would need to call the program, whatever you name it and pass in the
report name each time you want to edit a report.

I've added a menu item to help with modifying things.

Do you have a shortcut you start VFP from?
You can pass a parameter to have it use a specific CONFIG.FPW file.

"C:\Program Files\Microsoft Visual FoxPro 9\vfp9.exe" -T
-C"c:\work\source\resource\config.fpw"

   -T == keeps the VFP splash screen from appearing
   -C == is the config.fpw to use

In the CONFIG.FPW file you can have
   Command=do .\resource\startup.prg

In here you can setup your environment. Run VFP code to create menu items,
etc...
        DEFINE BAR 1 OF _MSM_TOOLS PROMPT "Hello"
        ON SELECTION BAR 1 OF _MSM_TOOLS MESSAGEBOX("Hello")

I actually create my own menu:

   Define Bar 1 Of (lcS3Dev) Prompt "Modify Program"
   Define Bar 2 Of (lcS3Dev) Prompt "Modify Form"
   Define Bar 3 Of (lcS3Dev) Prompt "Modify Class"
   Define Bar 4 Of (lcS3Dev) Prompt "Modify Report"
   DEFINE BAR 5 OF (lcS3dev) PROMPT "Modify File"

You can modify the code below to call the function I pasted the other day.

   Procedure SelectModify 
   Lparameters tcExt
   If Empty(tcExt)
      tcExt = "*"
   Endif
   Local lcFile, lcTitle, lcCurDir, laFile[1]
   lcCurDir = Fullpath("")
   Do Case 
   Case tcExt = "PRG"
      lcTitle = "Select a Program"
   Case tcExt = "SCX"
      lcTitle = "Select a Form"
   Case tcExt = "VCX"
      lcTitle = "Select a ClassLib"
   Otherwise 
      lcTitle = "Select a File"
   EndCase
   lcFile = LOWER(Getfile(tcExt,"","Modify",1,lcTitle))
   Set Default To (lcCurDir)
   IF NOT EMPTY(lcfile)
      IF ADIR(laFile, lcFile, "", 1) > 0
         lcFile = ADDBS(JUSTPATH(lcfile)) + laFile[1,1]
      ENDIF 
   ENDIF 
   Do Case 
   Case Empty(lcFile)
   Case Upper(tcExt) = "PRG"
      Modify Command (lcFile) Nowait 
   Case Upper(tcExt) = "SCX"
      Modify Form (lcFile) Nowait 
   Case Upper(tcExt) = "DBF"
      Use (lcFile) In Select(Juststem(lcFile)) Shared Again Noupdate 
      Select Select(Juststem(lcFile))
      Browse Last Nowait 
   Case Upper(tcExt) = "VCX"
      Modify Class ? of (lcFile)
   Otherwise
      Modify File (lcFile) Nowait 
   Endcase 
   Endproc


Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to