Plug in for IE in seperate window

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

Plug in for IE in seperate window
 
ravinukala




Posts: 103
Joined: 2012-10-05
Hi,

I am creating plug in for IE. I have explorer bar in my plug in.
When small pop up window opens I want my plug in to open as separate window.
How can do this using Add In express?

Idea is it should be like IE developer tool window.

Thanks
Posted 05 Oct, 2012 02:56:44 Top
Sergey Grischenko


Add-in Express team


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

You can use Windows Forms to create a separate .NET window with the custom UI.
Posted 05 Oct, 2012 04:36:44 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi Sergey,

Sorry, I am not getting it. Can you please explain in detail what exactly I need to do?

Thanks
Posted 05 Oct, 2012 06:51:14 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi Sergey,

I have created windows form but not able access HtmlDocument into it.

Can you please share sample code if you have.

Thanks,
Posted 08 Oct, 2012 01:30:52 Top
Sergey Grischenko


Add-in Express team


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

You can access HTML document using the following code:

....
IEModule module = (IEModule)AddinExpress.IE.ADXIEModule.CurrentInstance[Thread.CurrentThread.ManagedThreadId];
mshtml.HTMLDocument htmlDoc = module.HTMLDocument;
....

Or just pass an instance of the iemodule to the constructor of your form.
Posted 08 Oct, 2012 04:03:06 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi Sergey,

Thanks for your prompt reply. Passing an instance of the iemodule to the constructor of form worked for me.

Can I get iemodules of all open windows/tabs in one separate form?

Please give me some ideas to achieve this.

Thanks
Posted 08 Oct, 2012 08:50:24 Top
Sergey Grischenko


Add-in Express team


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

You can use the GetModuleCount, GetModuleByIndex, GetModuleByTabIndex, GetModuleByThread, GetModuleIndex and GetTabIndex methods to access all instances of your add-on. These methods are available in IEModule.
Also you can get all modules using the 'GetModulesByTypeName' static method of the ADXIEModule class.
Posted 09 Oct, 2012 04:36:22 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi Sergey,

Thanks for your reply.

How can I just create one instance of separate window and access all iemodules of all open windows/tabs into it.

Right now it is creating separate window for each open windows/tabs.

Thanks
Posted 09 Oct, 2012 06:08:50 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Ravi, you just need to check if the window is already open in another tab. To access an iemodule in another tab you can use the methods mentioned above.
Posted 09 Oct, 2012 09:21:34 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi Sergey,

I am Getting {System.Runtime.Remoting.Proxies.__TransparentProxy} as output using GetModuleByTabIndex(0) method.

I am not able to do anything with it.

Also Is there any way to access iemodule in another window (not tab)?

Thanks.
Posted 10 Oct, 2012 05:15:33 Top