FormRegion.Parent should return the Inspector the form region is associated
with, as should the Inspector property.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"John Erickson" wrote in message
...
Thanks to your advise I'm now advising my eventing object at NewInspector
and
NewExplorer times so that I can catch the Close() events and clean up. I
still need to tie things together at BeforeFormRegionShow time though. I
need
to know at that time if this is being issued for an Explorer or an
Inspector
and which instance of which so that I can tie my form region objects to
the
appropriate inspector or explorer. That way when the appropriate explorer
or
inspector Close()s I can clean up my custom form object as well. The way I
am
currently doing that is by doing a pFormRegion-get_Inspector. If that
returns null, than I assume it's being called on behalf of an explorer
rather
than an inspector. I then use an Outlook::Application-ActiveExporer call
to
determine which (if there can be more than one) explorer this
BeforeFormRegionShow is beind called for. The results of those two calls
allow me to tie my form objects with the appropriate explorer or
inspector.
The get_Inspector call doesn't seem to be creating a new Inspector since
it
returns null if the BeforeFormRegionShow call is for an explorer. Am I
missing something? Is there a better way to determine who
BeforeFormRegionShow is being called for? Has my custom form already been
added to the explorer or inspector by the time a NewInspector or
NewExplorer
call has been made? I assumed not, but if it is I could initialize my
custom
form at that time instead of at BeforeFormRegionShow time. But, I dont see
a
way to get the _FormRegion object then. It would be nice if the
BeforeFormRegionShow or the _FormRegion object could tell me it's owner.
Does
get_Parent return the Explorer or Inspector object the region is for?
John