-
1
- #1
First, VFP ROCKS!
VFP Project Manager allows you to add any type of file on the "Other" Tab. But trying to Modify only works for text, JPG and possibly BMP files (It would seem only for a few of us.). So, then, in my case, to be able to open any file "type" using the default editor, you need to use Project Hook. Don't faint yet. There is advice on how to add a project Hook, here on Tek-Tips. It is very easy. Once you have added it, you must shut down your Project Manager and open the project hook manually... something like this:
MODIFY CLASS phook OF f:\a_i\classes\phook.vcx
Once the PHook class is opened, find the Event "QueryModifyFile" and add something like this to it.
LPARAMETERS oFile, cClassName
IF LOWER(JUSTEXT(oFile.name))="docx" ;
OR LOWER(JUSTEXT(oFile.name))="doc";
OR LOWER(JUSTEXT(oFile.name))="graphml";
OR LOWER(JUSTEXT(oFile.name))="ufo"; && Make sure that the file Extension case is correctly entered
NODEFAULT
DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
cAction = "open"
ShellExecute(0,cAction,oFile.name,"","",1)
ELSE
DODEFAULT(oFile, cClassName)
ENDIF
Save your Project Hook. And now you have full power over every kind of default file editor used to edit your extraneous files... for your VFP Project. No need to get out of VFP and go find files in their own directory. Just DoubleClick the files added in the Other Tab of your VFP Project Manager. I use Flow chart editors, GimpShop, MS WORD 2003, 2010, NotePad++, InkScape, Blender, Photoimpact and other. You can use the "Text Files" sub-heading or the "Other Files" sub-heading to add your new resources. Have fun... (And if it is only me, then, I'm having a blast.)
Dennis
VFP Project Manager allows you to add any type of file on the "Other" Tab. But trying to Modify only works for text, JPG and possibly BMP files (It would seem only for a few of us.). So, then, in my case, to be able to open any file "type" using the default editor, you need to use Project Hook. Don't faint yet. There is advice on how to add a project Hook, here on Tek-Tips. It is very easy. Once you have added it, you must shut down your Project Manager and open the project hook manually... something like this:
MODIFY CLASS phook OF f:\a_i\classes\phook.vcx
Once the PHook class is opened, find the Event "QueryModifyFile" and add something like this to it.
LPARAMETERS oFile, cClassName
IF LOWER(JUSTEXT(oFile.name))="docx" ;
OR LOWER(JUSTEXT(oFile.name))="doc";
OR LOWER(JUSTEXT(oFile.name))="graphml";
OR LOWER(JUSTEXT(oFile.name))="ufo"; && Make sure that the file Extension case is correctly entered
NODEFAULT
DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
cAction = "open"
ShellExecute(0,cAction,oFile.name,"","",1)
ELSE
DODEFAULT(oFile, cClassName)
ENDIF
Save your Project Hook. And now you have full power over every kind of default file editor used to edit your extraneous files... for your VFP Project. No need to get out of VFP and go find files in their own directory. Just DoubleClick the files added in the Other Tab of your VFP Project Manager. I use Flow chart editors, GimpShop, MS WORD 2003, 2010, NotePad++, InkScape, Blender, Photoimpact and other. You can use the "Text Files" sub-heading or the "Other Files" sub-heading to add your new resources. Have fun... (And if it is only me, then, I'm having a blast.)
Dennis