Share via


Getting VSIP to browse

The VS.NET SDK (a.k.a. VSIP package) lacks the wide spread use and documentation that other SDKs enjoy.  To make a change to that here's a little snippet that shows you how to open the VS.NET webbrowser and browse to a particular page:

 

IVsWebBrowsingService web = (IVsWebBrowsingService)Vsip.VsPackage.VsPackage.GetGlobalService(typeof(IVsWebBrowsingService));

if (web == null)

   return;

IVsWebBrowser ppBrowser;

IVsWebBrowserUser pUser = (IVsWebBrowserUser)Vsip.VsPackage.VsPackage.GetGlobalService(typeof(IVsWebBrowserUser));

IVsWindowFrame ppFrame;

Guid g = new Guid();

g = Vsip.VsPackage.GuidList.guidToolWindowPersistance;

uint flags = (uint)(__VSCREATEWEBBROWSER.VSCWB_ForceNew | __VSCREATEWEBBROWSER.VSCWB_AutoShow);

web.Navigate(URL, flags, out ppFrame);