Hi Carlos,
I still have'nt work with add-ins and macros, so I cannot properly talk
about it, but I'll explain you how I use this interface through the designer
of a component, and perhaps it helps you.
Anyway, I was testing the points you expose in your previous message, and
this interface does'nt solve them.
// Make the designer implements IComponentInitializer
class MyComponentDesigner:System.ComponentModel.Design.ComponentDesigner,
IComponentInitializer
{
...
// Implement the interface
void
IComponentInitializer.InitializeExistingComponent(System.Collections.IDictionary
defaultValues)
{
base.InitializeExistingComponent(defaultValues);
// hook point
}
void
IComponentInitializer.InitializeNewComponent(System.Collections.IDictionary
defaultValues)
{
base.InitializeNewComponent(defaultValues);
// hook point }
}
}
"Carlos J. Quintero [VB MVP]" <nospam@nospam.com> escribió en el mensaje
news:eeejPVjPHHA.3872@TK2MSFTNGP06.phx.gbl...
[quoted text, click to view] > Ah, yes, I found that interface sometime ago but I don't know how to use
> it from outside a control designer (from an add-in, for example). Let me
> know if you get more info.
>
>
> --
>
> Best regards,
>
> Carlos J. Quintero
>
> MZ-Tools: Productivity add-ins for Visual Studio
> You can code, design and document much faster:
>
http://www.mztools.com >
>
> "Mario Vázquez" <alguien@microsoft.com> escribió en el mensaje
> news:epNKZDxOHHA.5064@TK2MSFTNGP04.phx.gbl...
>> Hi Carlos,
>>
>> Thanks for the tip.
>> Well, it seems not an easy issue.
>> I've just found an interface (framework 2.0) that may help.
>> IComponentInitializer
>> It has two methods which give a choice to hook the creation of new and
>> existing components. But i've not investigate if this is true for all the
>> cases you expose.
>>
>> Regards,
>> Mario Vazquez
>>
>