I have an interesting problem with a COM component written to work as a toolbar in IE. In principle, if you open several tabs at once in IE, individual instances of COM objects become all twisted. Bear with me here.
Let's say I open five browser tabs at once, right-clicking on several links and opening them on new tabs. Now the function of my toolbar is to select text on a web page, and then click a button to copy that text to the toolbar. So do it on tab 3. We select the text and press the button, and nothing exists. However, if we select the text on tab 2, go back to tab 3 and press the button, we get the text selected on tab 2. So ... the toolbar on tab 3 gets the material from tab 2. Not good.
I traced this problem to static links inside our COM object, a toolbar.
[ComVisible(true), Guid("2CC75392-1182-470D-BECC-EFA33E629AB8")]
[CLSCompliant(false)]
public sealed class Toolbar : ADXIEToolbar
{
public static Toolbar Instance;
public Toolbar()
{
Instance = this;
InitializeComponent();
}
...other code...
}
Note that for each IE tab, there is only one instance of the toolbar.
, , ( ), - . . . .
, ( InitializeComponent) , .
this.publicationDateCb.Toolbar = this;
.
, . , , - , , . .
( , ), , ?
:
- IE .
- BHO/ , IE.
- Add-In-Express Internet Explorer IE.
- .NET 3.5; .NET 2.0