Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using both VFP 5.0 & 6.0 on the same PC?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00172422
Message ID:
00172691
Views:
25
>>>Does anyone know of any problems having both versions 5.0 & 6.0 installed on the same workstation. We must continue to have 5.0 installed to perform updates to our existing program we already have distributed, but would like to start using version 6.0 for any new applications developed.
>>>
>>
>>The only 'problem' I've encountered is the association of various file extensions changed from VFP 5 to VFP6, and some of my custom actions that I'd associated with various VFP-controlled filetypes had to be rebuilt.
>>
>>>Thanks for any response.
>>>
>>>Regards,
>>>John
>
>Hi Ed,
>
>Would you mind to share with us the kind of action you associate to the file extensions?
>

Sure. The most obvious one is adding Edit and Print actions action to .PRG files, so that these actions are available by right-clicking in Explorer. I invoke the VFP editor against the .PRG by having a tiny .PRG file in my VFP5 directory that accepts a single parameter to specify the file to edit:
*MODICOMM.PRG
LPARAMETERS cFileToEdit
IF TYPE('cFileToEdit') = 'C' AND FILE(cFileToEdit)
   MODIFY COMMAND (cFileToEdit) NOWAIT
ENDIF
CANCEL
I then have a registry key HKEY_CLASSES_ROOT\Visual.FoxPro.Program.5\Shell\Edit\Command with a value of

E:\Program Files\VFP5\VFP5.EXE "E:\Program Files\VFP5\MODICOMM" "%1"

This starts a VFP session and edits the .PRG that I right clicked and selected Edit from within Explorer.

For the Print action, I use Notepad to print, just like a .TXT file, so I have a registry key HKEY_CLASSES_ROOT\Visual.FoxPro.Program.5\Shell\Print\Command with a value of

C:\WINDOWS\NOTEPAD.EXE /p "%1"

Adding this .PRG and the two registry keys adds the two actions I most likely want to do if I don't want to simply run the .PRG in place. You can maintain the actions using the File Associations menu accessed from Explorer (in Win98 and NT 4 with Active Desktop, View/Folder Options/File Types brings up the File Associations page; the Edit button allows you to change, add or delete actions associated with a file extension.)


>By the way, I'd like to thank you for the helpfulness of your messages in this forum. They help elevate everyone's level here.

Thanks!

Ed
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform