>>>Hi
>>>
>>>I knopw I should know it.
>>>
>>>I have a
>>>
>>>MODIFY PROJECT (lcFile) NOWAIT NOSHOW NOPROJECTHOOK
>>>
>>>
>>>this raises a dialog to tell me that the prjecthook library is not found.
>>>
>>>How can I suppress the dialog so that I just can deal with the error?
>>
>>Open pjx as dbf and delete the record where it mentions the hook?
>
>Nope. It's intended that the vcx is no there. The VCX will be created from a text file.
>If I can MODI PROJ I can ask the project for the hook and process the text file.
>If this errors I still can parse the PJX as DBF - but this is so boring. :)
>Number one best would be to ignore the err - it will open the PJX with all the info, and I don't need the hook in that moment.
>
>it's just
>
>*... create anything that belongs to the pjx (including pjx) except the hook
> MODIFY PROJECT (lcFile) NOWAIT NOSHOW NOPROJECTHOOK
> loProject = _VFP.PROJECTS(JUSTFNAME(lcFile))
> lcFile = loProject.PROJECTHOOKLIBRARY
> loProject.CLOSE
>*.. post process hook
>*now pjx is valid
>
>
>:)
Neat... for a while I was playing with the project object- I actually have a couple of things using it regularly, but didn't need to touch that code for years, which is why I forgot you can use it for this. That's about the time I discovered the hook class always get compiled with the project, can't keep it outside. And mine was in a general purpose library which I explicitly did not want included in the project. So I decided the project hooks are more trouble than they're worth - and you've just added one more bullet to my ammo against it.