C
Casey
Hi,
I found the following KB article on MSDN that shows how to apply XP themes
to Office COM Addins and it works:
http://support.microsoft.com/kb/830033/en-us?spid=2488&sid=251
The solution suggests wrapping all your forms with a using block that pushes
a themed activation context before any of your controls are created.
However, we have many forms, messageboxes, etc. and it is cumbersome to wrap
each one with a using block. So, I tried creating one instance of the
EnableThemingInScope (activating the themed activation context) in the
Connect method of my addin, then hold onto the reference and dispose of it
in the OnDisconnection method. It worked somewhat in OfficeXP (2002), but
did not work and caused a crash in Office2003 when trying to dispose
(deactivate the activation context). Any ideas why? Is there an easier way
to enable theming in Office COM Addins? I guess I need to know more about
activation contexts.
Thanks,
Casey
ps- I noticed in another post that someone else launches there forms from an
exe so they can use a manifest to apply XP themes, but that is not an
appropriate solution for us.
I found the following KB article on MSDN that shows how to apply XP themes
to Office COM Addins and it works:
http://support.microsoft.com/kb/830033/en-us?spid=2488&sid=251
The solution suggests wrapping all your forms with a using block that pushes
a themed activation context before any of your controls are created.
However, we have many forms, messageboxes, etc. and it is cumbersome to wrap
each one with a using block. So, I tried creating one instance of the
EnableThemingInScope (activating the themed activation context) in the
Connect method of my addin, then hold onto the reference and dispose of it
in the OnDisconnection method. It worked somewhat in OfficeXP (2002), but
did not work and caused a crash in Office2003 when trying to dispose
(deactivate the activation context). Any ideas why? Is there an easier way
to enable theming in Office COM Addins? I guess I need to know more about
activation contexts.
Thanks,
Casey
ps- I noticed in another post that someone else launches there forms from an
exe so they can use a manifest to apply XP themes, but that is not an
appropriate solution for us.