New instance of toolbar in every tab

Add-in Express™ Support Service
That's what is more important than anything else

New instance of toolbar in every tab
 
Hagay Albo




Posts: 2
Joined: 2011-03-14
Hi ,

i would like to know if it is possible to use the same toolbar as opened in the first tab?

today if i open a new tab, a new instance of the toolbar is created and all the settings and information from the first tab is lost.

what i want to do is that if i have a toolbar on tab a and open a new tab b the MyIEToolBar1() will not run and instead will use the same instance from toolbar in tab a.

Thanks
Posted 14 Mar, 2011 12:49:56 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Hagay,

No, it is not possible. It is by design in IE.
To synchronize your settings you can use the following approach:
http://www.add-in-express.com/creating-addins-blog/2009/06/19/internet-explorer-plugin-settings-synchronize/
Posted 14 Mar, 2011 13:23:24 Top
Hagay Albo




Posts: 2
Joined: 2011-03-14
Thanks,

one more question .

i'am trying to do this by using messagetoall

private void button2_Click(object sender, EventArgs e)
{
this.SendMessageToAll(1, IntPtr.Zero, IntPtr.Zero);
}

private void MyIEToolBar1_OnSendMessage(AddinExpress.IE.ADXIESendMessageEventArgs e)
{
MessageBox.Show("Test");
}

but the MyIEToolBar1_OnSendMessage is not fired when pressing the button.

am i doing something wrong?
Posted 14 Mar, 2011 15:14:25 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Please change the code as shown below:

int WM_USER = 0x0400;
int MY_MESSAGE = WM_USER + 100;

private void button2_Click(object sender, EventArgs e)
{
this.SendMessageToAll(MY_MESSAGE, IntPtr.Zero, IntPtr.Zero);
}
Posted 15 Mar, 2011 05:24:12 Top