コード例 #1
0
 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 { }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: HtmlControl.cs プロジェクト: jayongg/Utilities
        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);
        }