JavaScript Editor js editor     Web development 

Main Page

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:

В Copy Code
_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 Project Manager Hooks.

See Also

JavaScript Editor js editor     Web development