Exemple #1
0
        void SetAllEvents()
        {
            if (m_IExplorer != null)
            {
                //1.Navigate Complete event
                DWebBrowserEvents2_NavigateComplete2EventHandler ncd
                    = new DWebBrowserEvents2_NavigateComplete2EventHandler(OnNavigateComplete);
                m_IExplorer.NavigateComplete2 += ncd;

                //2.Quit Event
                DWebBrowserEvents2_OnQuitEventHandler DQuitE
                    = new DWebBrowserEvents2_OnQuitEventHandler(OnQuit);
                m_IExplorer.OnQuit += DQuitE;

                //3.Statusbar text changed event
                DWebBrowserEvents2_StatusTextChangeEventHandler DStatusE
                    = new DWebBrowserEvents2_StatusTextChangeEventHandler(OnStatusTextChange);
                m_IExplorer.StatusTextChange += DStatusE;

                //4.Fired when download progress is updated.
                DWebBrowserEvents2_ProgressChangeEventHandler DProgressE
                    = new DWebBrowserEvents2_ProgressChangeEventHandler(OnProgressChange);
                m_IExplorer.ProgressChange += DProgressE;

                //5.Command State change event
                DWebBrowserEvents2_CommandStateChangeEventHandler DCommandE
                    = new DWebBrowserEvents2_CommandStateChangeEventHandler(OnCommandStateChange);
                m_IExplorer.CommandStateChange += DCommandE;

                //6.DownLoad begin event
                DWebBrowserEvents2_DownloadBeginEventHandler DDownLoadStartE
                    = new DWebBrowserEvents2_DownloadBeginEventHandler(OnDownloadBegin);
                m_IExplorer.DownloadBegin += DDownLoadStartE;

                //7.DownLoad complete event
                DWebBrowserEvents2_DownloadCompleteEventHandler DDownLoadEndE
                    = new DWebBrowserEvents2_DownloadCompleteEventHandler(OnDownloadComplete);
                m_IExplorer.DownloadComplete += DDownLoadEndE;

                //8.Title Change event
                DWebBrowserEvents2_TitleChangeEventHandler DTitleChangeE
                    = new DWebBrowserEvents2_TitleChangeEventHandler(OnTitleChange);
                m_IExplorer.TitleChange += DTitleChangeE;

                //9.Property change event
                DWebBrowserEvents2_PropertyChangeEventHandler DPropertyChangeE
                    = new DWebBrowserEvents2_PropertyChangeEventHandler(OnPropertyChange);
                m_IExplorer.PropertyChange += DPropertyChangeE;

                //10.Before navigate event
                DWebBrowserEvents2_BeforeNavigate2EventHandler DBeforeNavigateE
                    = new DWebBrowserEvents2_BeforeNavigate2EventHandler(OnBeforeNavigate2);
                m_IExplorer.BeforeNavigate2 += DBeforeNavigateE;

                //11.Document complete event
                DWebBrowserEvents2_DocumentCompleteEventHandler DDocumentCompleteE
                    = new DWebBrowserEvents2_DocumentCompleteEventHandler(OnDocumentComplete);
                m_IExplorer.DocumentComplete += DDocumentCompleteE;

                //12.Creating a new window event
                DWebBrowserEvents2_NewWindow2EventHandler DNewWindowE
                    = new DWebBrowserEvents2_NewWindow2EventHandler(OnNewWindow2);
                m_IExplorer.NewWindow2 += DNewWindowE;

                //13.Full Screen event
                DWebBrowserEvents2_OnFullScreenEventHandler DFullScreenE
                    = new DWebBrowserEvents2_OnFullScreenEventHandler(OnFullScreen);
                m_IExplorer.OnFullScreen += DFullScreenE;

                //14.Menubar change event
                DWebBrowserEvents2_OnMenuBarEventHandler DMenuBarE
                    = new DWebBrowserEvents2_OnMenuBarEventHandler(OnMenuBar);
                m_IExplorer.OnMenuBar += DMenuBarE;

                //15.Toolbar change event
                DWebBrowserEvents2_OnToolBarEventHandler DToolBarE
                    = new DWebBrowserEvents2_OnToolBarEventHandler(OnToolBar);
                m_IExplorer.OnToolBar += DToolBarE;

                //16.Visibility change event
                DWebBrowserEvents2_OnVisibleEventHandler DOnVisibleE
                    = new DWebBrowserEvents2_OnVisibleEventHandler(OnVisible);
                m_IExplorer.OnVisible += DOnVisibleE;

                //17.Threat Mode event
                DWebBrowserEvents2_OnTheaterModeEventHandler DTheaterE
                    = new DWebBrowserEvents2_OnTheaterModeEventHandler(OnTheaterMode);
                m_IExplorer.OnTheaterMode += DTheaterE;
            }
        }
	public virtual void add_OnMenuBar (DWebBrowserEvents2_OnMenuBarEventHandler );