Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Project Manager Hooks
Message
From
11/09/2001 10:39:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00555047
Message ID:
00555164
Views:
17
Yes, I was afraid that nothing could be done. As I said, Destroy() is too late. Apparently, Destroy() means "AfterProjectIsDestroyed()". There seems to be no event like "BeforeDestroy()".

Hilmar.

>>I tried to intercept the Destroy event (for the project manager) with NoDefault, but it seems that when this event is reached, it is already too late to stop the project manager from closing. What I want to do is ask for confirmation when I press ESC to close the project manager. Can this be done?
>>
>>The reason is that it takes quite long to re-open the project manager (source control), and I want to avoid closing it by accident.
>>
>>Hilmar.
>
>Hilmar,
>I don't think you can do what you want using the ProjectHook class. The reason is the relationship between the project and hook isn't as related as you need.
>
>The projecthook object does't have any control over the project itself. It isn't contained in it. It is an object assigned to the ProjectHook property. As such, making the ProjectHook stay alive doesn't have an effect on the Project itself. It isn't its Parent.
>
>I had thought you may be able to do something using the Project object itself and possibly VFPCom in VFP 6 or EventHandler in VFP 7 (because the Project object is a COM object). However, the Project object exposes no events to bind to so that theory went out the window.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform