open pop up when opening browser

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

open pop up when opening browser
 
princy rose




Posts: 10
Joined: 2010-09-14
Hello,

I have used the following code to show the popup dialog box when opening browser.

I have one issue in that. when i click OK control i need to open the url in another tab. How can i do that ? I used the IEApp.Navigate command but it doesnt work. what is the issue in that ?


My code:

if (form1.DialogResult == DialogResult.OK){
System.Object one = null;
System.Object two = null;
System.Object three = null;
System.Object four = null;

IEApp.Navigate(@"//www.add-in-express.com", ref one, ref two, ref three, ref four);
form1.Dispose();
} else {
MessageBox.Show("The Cancel button on the form was clicked.");
form1.Dispose();
}


[B]
Posted 24 Sep, 2010 02:29:33 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Princy,

Please have a look at the Advanced Search sample add-on for Internet Explorer. You can find the following code in the mentioned sample add-on:

System.Object one = 0x0800;
System.Object two = "_self";
System.Object three = null;
System.Object four = null;
IEApp.Navigate("//www.add-in-express.com", ref one, ref two, ref three, ref four);
.NET, Extended MAPI, Windows Phone & RT
Posted 24 Sep, 2010 06:20:56 Top
princy rose




Posts: 10
Joined: 2010-09-14
Hello,


Thank you for your response. It is opening in another tab and working fine.

But i called this (show Dialog box) event in MyIEToolBar1_OnConnect,MyIEToolBar1_OnSendMessage.

when i click to open every tab it shows Dialog box every time. How can i avoid this and which event i can call for this function. I need only when opens the browser. Can you please send any code ?

Also please note that it takes too much time to load the page, if i use show Dialog box function. Any reason for this ? how can i fix for this ?
Posted 24 Sep, 2010 07:33:51 Top
Andrei Smolin


Add-in Express team


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

You can use the aproach descirbed in HowTo: Synchronize settings of an IE plug-in to maintain a global flag across all IE threads and processes.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Sep, 2010 09:19:26 Top