Help Issue Subclassing and Inspector event handling

J

jbhan

Hi,

I am trying to subclass a windows form to Outlook.
I have implemented an inspector wrapper which has a close
event handler for each inspector that is opened/ closed.

In the send event of the mail item depending on certain
conditions I cancel the send or not.
Now my problem is that when I DON'T cancel the send and
the inspector window closes, the subclassing events of
moved and sized get trigerred and my close event handler
for the inspector is ignored. As a result the cleaning up
is not happening.

Can anyone help me understand how the execution takes
places when both an event handler and a subclass event
are getting triggered? Does one take precedence over the
other and is there any way for me to disable subclassing
and let only the inspector close event handler execute.
Why is it the the close event handler is not getting
executed.

Any help and pointers will be really appreciated!

Thanks,
jbhan
 
K

Ken Slovak - [MVP - Outlook]

Hard to say without seeing your code and how you are subclassing items.
Generally an subclassed object's events will fire until the object is either
released (set to Nothing) or it goes out of scope.

As for the order of events firing what I do is set up every event handler
I'm interested in and put a debug.print statement in the handler with the
name of the event. That provides a list of what's happening and when.

In an Inspector, depending on Outlook version, you will see different orders
of events firing and sometimes, like when Next or Previous are used, even
multiple firings of the same event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top