Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working directory path
Message
From
19/12/2001 08:26:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00594593
Message ID:
00596060
Views:
23
You should make a prg as main and include the following code



public ExePath && Executable Path
PUBLIC datapath && works database folders
PUBLIC formspath


* Set Default directory to Projects Directory
* If run from Visual Foxpro 6.0
IF !FILE('mainform.scx')
cCurrentProcedure = SYS(16,1)
nPathStart = AT(":",cCurrentProcedure)- 1
nLenOfPath = RAT("\", cCurrentProcedure) - (nPathStart)
ExePath=(SUBSTR(cCurrentProcedure, nPathStart, nLenofPath))
else
ExePath=sys(5)+sys(2003)
ENDIF
DataPath=exepath+"\data"
FormsPath=exepath+"\forms"

SET DEFAULT TO (ExePath)


do form formspath+"\mainform"
read events
Previous
Reply
Map
View

Click here to load this message in the networking platform