ActiveProject

This property of the application object gives you access to the most recently used open project.

Usage

oProject = appApplication.ActiveProject
appApplication.ActiveProject.Property = uValue
uValue = appApplication.ActiveProject.Property
appApplication.ActiveProject.Method()
Starting in VFP 6, you can manipulate projects programmatically. This property lets you figure out which one is on top so you can work with it. You access it through the _VFP variable or the Application object.Beware. If no projects are open, accessing this property triggers an OLE error. Be sure to test with TYPE() (not VARTYPE()) or _VFP.Projects.Count > 0 before using it unless you know there's an open project.

Example

* Get a reference to the current project
oCurrentProj = Application.ActiveProject
 
* Display the name and last build date of the current project
?Application.ActiveProject.Name
?Application.ActiveProject.BuildDateTime

See Also

Application, Project, Projects, _VFP


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .