Hi Steve,
The code below shows how you can manipulate a project programmaticaly and than build EXE.
ccBUILDACTION_BUILDEXE = 3
lcProject = "test"
Modify Project (lcProject) NOWAIT NOSHOW
loProj = _VFP.ActiveProject
loProj.SetMain("test")
loProj.Build(lcProject, ccBUILDACTION_BUILDEXE)
loProj.Close()
>How can I programmatically set the main program prior to building the exe?
>
>I am using this to build an exe
>build myExe from myProj recompile
>
>but I would like to be able to switch the "main" program to build another EXE located
>in the same project.
>
>I have found this Object.SetMain([cFileName]) in help but am not sure how to
>create the project object in the first place.
>
>
--sb--