Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to associate a PRG with VFP to EDIT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00167914
Message ID:
00168012
Vues:
29
>>hey anyone know how to associate a PRG with VFP to EDIT rather than run? I have tried with no success to look for command line params and I changed the dde message to edit... But, alas, still no go at this station.
>>
>>AdvThanksance
>
>Hi Joe, long time no see you ;
>At least in 5.0, you go to the menu "Tools", then select "options"
>and click on the tab "project", on "Project double-click action"
>select "Modify select file", that will do it.
>

This has nothing to do with how VFP handles editing - he's trying to make the File Association in the registry edit the .PRG rather than run it when the .PRG is clicked in Explorer. This requires changing a registry key; by default, this causes VFP to start and sends it a message via DDE to run the program.

It's easy enough to start a different program as an editor, or to start a separate VFP session than the one that might be running and have the new VFP session start a .PRG that accepts a command line parameter for the file name; it could then DO a MODI COMM (FileNameParm) NOWAIT to start the editor.

It would be better to use DDE;' unfortunately, I don't know the dde operation or context required in the registry to do this. What I actually do if I want an edit action that starts a fresh VFP and edits the .PRG is have a small program in my VFP directory called MODICOMM.PRG that reads like:
lparameters cFileToOpen
CLEAR
MODI COMM (cFileToOpen) NOWAIT
CANCEL
and an accompanying edit key in my registry that runs the command:

"C:\Program Files\DevStudio\VFP\VFP.EXE" "%1"

>P.S. Don't forget to click on "Set as Default".
>Good luck.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform