Call function once window open

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

Call function once window open
princy rose

Posts: 10
Joined: 2010-09-14

I need to call the function once when opening browser only. I have used the following code to open the ShowDialog Box. But it opens every time when i click the new tab and child window if any. So for this, in which event i can call this function.

My code:

private void MyIEToolBar1_OnConnect(object sender, int threadId)
this.SendMessage(0x400 + 1000, IntPtr.Zero, IntPtr.Zero);

private void MyIEToolBar1_OnSendMessage(AddinExpress.IE.ADXIESendMessageEventArgs e){
if (e.Message == 0x400 + 1000) {
Form form1 = new Form();

if (form1.DialogResult == DialogResult.OK) {
System.Object one = null;
System.Object two = null;
System.Object three = null;
System.Object four = null;
IEApp.Navigate(@"//", ref one, ref two, ref three, ref four);
} else {
Posted 24 Sep, 2010 05:26:49 Top
Andrei Smolin

Add-in Express team

Posts: 17950
Joined: 2006-05-11
Hi princy,

That event occura whenever a new tab is opened. To bypass this, you can use a global flag. Pay attention to HowTo: Synchronize settings of an IE plug-in.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Sep, 2010 05:52:23 Top