Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set the default dir and search path...
Message
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00230621
Message ID:
00230651
Views:
24
You probably know that Tools, Options, File Locations is the place to set defaults for general use, but if you want it to change depending upon which project you are using you might want to use this trick I picked up somewhere.

The project is actually an Object and as such has properties which you can query.

If a project was open the last time you closed VFP it will open upon startup. If you place the following code in VFPStart.prg it will be called after the Project is opened and it can get the path from the project.

_VFP references what we used to call _screen.

by using this trick the what ever project is opened automatically will determine the current directory.




IF TYPE('_vfp.activeproject.name')# 'U'
cd (justpath(_vfp.activeproject.name))
ENDIF
SET PATH TO

I put the following code in the Config.fpw

COMMAND= DO VFPSTART.PRG

Does this answer your question?
Royal Cardon
ProgrammingANALYSIS
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform