Files
This collection contains one item for each file in a project. It's part of the scheme added in VFP 6 for handling projects and their contents programmatically. Usage | prjProject.Files.Method() prjProject.Files[ nIndex ].Method() uValue = prjProject.Files[ nIndex ].Property prjProject.Files[ nIndex ].Property = uValue |
In the original release of VFP 7, the Files collection doesn't always get updated when it should. When you add a file other than a program (say, a form or menu), it doesn't show up in the Files collection, and Files.Count doesn't change for a while. Closing and reopening the project fixes the problem, but what a pain! Since this bug is likely to break a huge percentage of the project hooks out there, we're not surprised that it's fixed in SP1. |
Example | * List all the files in the active project. FOR EACH oFile IN Application.ActiveProject.Files ?oFile.Name ENDFOR |
See Also | Add, Count Property, File, Item, Project |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.