SET TEXTMERGE

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


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net