Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple tabs in IE7 with one instance of the toolbar

I have developed a toolbar for Internet Explorer in C# to send and receive URLs from an external application. It ran great in IE6, but I wanted to take advantage of tabbed browsing in the new version (IE7), but I've run into a snag there. It seems in IE7, each tab counts a separate instance, and therefore a separate instance of my toolbar.

For the life of me, I can't find a way to have a single instance appear across every tab in a single IE window. All I can figure to do is register as a com object to the ROT and have each instance communicate and mirror all the others, but that seems needlessly complex. Has anyone found a workaround for this?

like image 348
directedition Avatar asked Nov 15 '22 15:11

directedition


1 Answers

Because you haven't said much about what your toolbar is doing, I'm going to assume that when you have multiple tabs open it's eating some resources... memory, networking, connections on the remote source, etc.

Rather than making sure only one instance is running, my suggestion is to keep track of which tab is active by listening to the WindowStateChanged event, then you could do a variety of things:

  • Shut down your communications while it's inactive.
  • Notify the remote source that the tab isn't active.
  • Simply not show notifications in inactive tabs.
  • Stop any threads you have running in the toolbar.
  • Etc.
like image 105
Ben Lesh Avatar answered Dec 18 '22 20:12

Ben Lesh