I use project hooks all over the place. Make my life a heck of a lot easier. Mostly stuff when the project opens to automatically run a project specific design time config prg, and to log activity to a audit table.
Also have stuff in BeforeBuild.
>Steve,
>
>My reply may inspire a couple of flames, but here goes. I have found the project hooks to be all but useless, and can generally do what they offer by an easier route.
>
>Consider this little PRG you could write (and never get involved with hooks):
>
>
>PROCEDURE BuildAProject
>LPARAM lcAPP
>LOCAL MyReport
>
>USE (lcAPP) ALIAS TheProject
>SCAN FOR TYPE = "R"
> *
> * Need to strip off a control character
> * at the end of the name
> *
> MyReport = LEFT(TheProject.Name,LEN(TheProject.Name)-1)
>
> SELE 0
> USE (MyReport) ALIAS TheReport
> REPLACE expr WITH "",;
> tag WITH "",;
> tag2 WITH ""
> USE
>
>ENDSCAN
>
>USE IN TheProject
>BUILD EXE &lcApp FROM &lcAPP RECOMPILE
>=Messagebox("I'm Finished!")
>
>
>Hope this helps.
>
>
>
>>I am reading through the Sep98 issue of Foxtalk and the Oct99 issue of Fox Advisor about ProjectHooks. I want to use one to keep the printer-specific info out of my reports (in the BeforeBuild event).
>>
>>But I'm too thick to figure out how to add a project hook to my project (now 98% done). Can anyone give me the basics of adding a ProjectHook?
Erik Moore
Clientelligence