Opening a browser(IE) window inside the VS IDE...

Hi,

Is there anyway to open an Internet Explorer window inside visual studio IDE. I need to open an IE window in the same area where start page opens in.

Thanks.

[195 byte] By [SanthoshS] at [2007-12-30]
# 1

Hi Santhosh,

That code should help you:

string command = "View.WebBrowser";

string args = @“C:\test.html”;

DTE dte = ProjectMgr.GetService(typeof(DTE)) as DTE;

if (dte != null)

{

dte.ExecuteCommand(command, args);

}

P.S. ProjectMgr in my sample - just an one of the implementations IServiceProvider interface containing one method - object GetService(Type type)

Good luck!

DmitryPavlov at 2007-9-5 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...
# 2

This will work, but a slightly cleaner way of doing it would be to call the ItemOperations.Navigate method:

dte.ItemOperations.Navigate(url, EnvDTE.vsNavigateOptions.vsNavigateOptionsNewWindow)

Craig

CraigSkibo-MSFT at 2007-9-5 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...
# 3

Hi Craig,

Thank you for your advice!

I'm using the way I described above but I have some difficulties with that. My HTML file contains Flash animation and when I open this HTML file I see the warning at the top of the VS browser window containing the following message: "To help protect your security, your web browser has restricted this file from showing active content that could access your computer Click here for option..."

I'm interesting how to remove that message? Does your way work without it?

Thanks!

Note 13-02-2007: I've tried your way - the same result - message is still shown..

I started new topic here - VS browser window shows the following message: "To help protect your security..."

DmitryPavlov at 2007-9-5 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...

Visual Studio

Site Classified