Saturday, August 2, 2014

Really completed webbrowser_documentcompleted



Code explain better


string body = "";
private void thebrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            if (thebrowser.ReadyState != WebBrowserReadyState.Complete)
                return;
            if (e.Url.AbsolutePath != (sender as WebBrowser).Url.AbsolutePath)
                return;
            if (body == thebrowser.Document.Body.InnerHtml) return;
            body = thebrowser.Document.Body.InnerHtml;

           
        }