Starting Visual FoxPro
If you are working on many Fox projects at once then it's
useful to have separate icons for each one on the desktop.
Use FoxPro's -c startup switch to make each of these
shortcuts lead to a different project.
Create a new shortcut to VFP.Exe on the desktop and add the
-c switch to the program name:
'D:\Visual Studio\Vfp98\VFP6.EXE' -cconfig.mkt
This tells FoxPro to use the config.mkt file instead of the
usual configuration file config.fpw. The FoxPro config
file is a plain text file which Fox reads as it loads.
You can set development options in the config file itself
but it's better to just use the config file to run a program.
You can then run this same program to reset your development
environment during testing.
Put the following line in the config.mkt file:
COMMAND
= DO e:\devestud.458\MrktStrt.Prg
Note that the program name is fully-pathed. You'll see the
reason for this later.
Now you need to write the startup program itself:
CLEAR MEMORY
CLOSE DATA
CLEAR ALL
CLOSE ALL
SET SYSMENU TO DEFAULT
IF WVISIBLE
('Standard')
RELEASE WINDOW
'Standard'
ENDIF
WITH _SCREEN
.BackColor
=
RGB
(0, 0, 0)
.ForeColor
=
RGB
(0, 255, 0)
.FontName
= 'Courier New'
.FontSize
= 10
.Caption
= 'Marketing Development'
.cls
ENDWITH
cd
e:\devestud.458\Dev
PUSH KEY CLEAR
ON KEY LABEL
f12 DO e:\devestud.458\MrktStrt.prg
MODIFY PROJECT
ContMan
NOWAIT
ACTIVATE WINDOW COMMAND
Now if you close FoxPro and click on the new shortcut, you'll
be ready to start work immediately - in the right directory with the right
project open. The screen caption will remind you what project you're
working on today and whenever your test runs fail to clean
up correctly you'll be able to press F12 to reset the environment.
FoxPro has a very open architecture with all the details documented in
the Help system or on-line and there is no real limit to what can
you can do to make the environment more comfortable and productive. You
can manipulate the _screen object to add
controls to the desktop. More details about
adding controls to the FoxPro screen
here.
|