Monday, February 28, 2005

C#: Run a new instance of IE from an application

run new instance of IE:
using SHDocVw;
public void OpenBrowser(string url)
{
object o = null;
SHDocVw.InternetExplorer ie = newSHDocVw.InternetExplorerClass();
IWebBrowserApp wb = (IWebBrowserApp) ie;
wb.Visible = true;
//Do anything else with the window here that you wish
wb.Navigate(url, ref o, ref o, ref o, ref o);
}

No comments: