ActiveProject Property
Contains an object reference to the Project object for the currently active Project Manager window. Read-only at design time and run time.
Object.ActiveProject
Remarks
Applies To: Application Object | _VFP System Variable
The ActiveProject property contains an object reference to the Project object for the foremost Project Manager window when more than one Project Manager window is open. An error is generated if you attempt to access the ActiveProject property when a Project Manager window isn't open.
For more information about projects, see Project Manager Hooks and Development Productivity Tools.
Example
The following example uses the ActiveProject property to get a count of Reports and Labels in an active project. If the MyApp project does not exist, it will be created when MODIFY PROJECT is executed.
MODIFY PROJECT myApp NOSHOW NOWAIT
nRptsLbls=0
FOR EACH oFile IN _VFP.ACTIVEPROJECT.FILES
IF INLIST(oFile.Type, "R", "B") && Report and Label
nRptsLbls=nRptsLbls+1
ENDIF
ENDFOR
See Also
Reference
Files Collection (Visual FoxPro)
Project Object (Visual FoxPro)
Projects Collection (Visual FoxPro)