Instantiated whenever a project is opened, providing programmatic access to project events.
A ProjectHook object is a Visual FoxPro base class that is instantiated by default whenever a project is opened. (You can include the NOPROJECTHOOK clause in CREATE PROJECT and MODIFY PROJECT to prevent a ProjectHook object from being instantiated for the project.)
The ProjectHook object allows programmatic access to events that occur in a project. For example, you can execute code whenever a file is added to a project. Note that you can specify a default project hook class for new projects in the Projects tab, of the Options dialog box or you can specify a default project hook class for an individual project in the Project Information dialog box. At runtime, you can use the ProjectHook property to specify a project hook class for a project as in the following example:
MODIFY PROJECT MyProject _VFP.Projects('MyProject.pjx').ProjectHook = ; NewObject('MyProjectHook', 'MyClass.vcx')
A ProjectHook base class can be created with CREATE CLASS, CREATEOBJECT( ), or NEWOBJECT( ).
For more information about projects, see.