public void DocumentComplete(object pDisp, string url) { try { IWebBrowser2 wb = (IWebBrowser2)pDisp; if (wb == control.GetOcx()) { // only fire on the topmost doc (frameset, not on every frame) // document is now ready (DOM accessable) control.RaiseOnDocumentComplete(new BrowserNavigateEventArgs(url)); } } catch { } }
public BrowserEvents2Multicaster(HtmlControl hc) { // Call QueryInterface for IConnectionPointContainer control = hc; UCOMIConnectionPointContainer icpc = (UCOMIConnectionPointContainer)hc.GetOcx(); // Find the connection point for the // DWebBrowserEvents2 source interface Guid g = typeof(IWebBrowserEvents2).GUID; icpc.FindConnectionPoint(ref g, out icp); // Pass a pointer to the host to the connection point icp.Advise(this, out cookie); }
public BrowserEvents2Multicaster(HtmlControl hc) { // Call QueryInterface for IConnectionPointContainer control = hc ; UCOMIConnectionPointContainer icpc = (UCOMIConnectionPointContainer)hc.GetOcx(); // Find the connection point for the // DWebBrowserEvents2 source interface Guid g = typeof(IWebBrowserEvents2).GUID; icpc.FindConnectionPoint(ref g, out icp); // Pass a pointer to the host to the connection point icp.Advise(this, out cookie); }