Ejemplo n.º 1
0
        /// <summary>
        /// 还要加一个该控件的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void axWebBrowser1_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
        {
            Object o = e.pDisp;

            oDocument = o.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, o, null);
            Object oApplication = o.GetType().InvokeMember("Application", BindingFlags.GetProperty, null, oDocument, null);
            Object oName        = o.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, oApplication, null);
        }
Ejemplo n.º 2
0
        void Browser_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
        {
            // Pass the valid document and window objects and build
            // a link report on the document
            BuildLinkReport();

            // Sink script errors for this window instance
            SinkScriptErrorEvents();
        }
Ejemplo n.º 3
0
        protected void AxWebBrowser_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
        {
            IHTMLDocument4 id4;
            object         boxID4 = AxWebBrowser.Document;

            id4 = (IHTMLDocument4)boxID4;

            // For testing only...
        }
Ejemplo n.º 4
0
        private void axWebBrowser1_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
        {
            //Note: You can use the reference to the document object to
            //      automate the document server.
            try
            {
                Object o = e.pDisp;

                oDocument = o.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, o, null);

                //Object oApplication = o.GetType().InvokeMember("Application", BindingFlags.GetProperty, null, oDocument, null);

                //Object oName = o.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, oApplication, null);

                //MessageBox.Show("File opened by: " + oName.ToString());
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                throw;
            }
        }
Ejemplo n.º 5
0
        private void AxWebBrowser_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
        {
            BrowserNavigateComplete2EventArgs args = new BrowserNavigateComplete2EventArgs(e.pDisp, (string)e.uRL);

            OnNavigateComplete2(args);
        }
 void Browser_NavigateComplete2(object sender,
                                DWebBrowserEvents2_NavigateComplete2Event e)
 {
     // Set the address box text to the current URL
     AddressBox.Text = Browser.LocationURL;
 }