I'm using a WebBrowser
control , there is an event which is called DocumentCompleted
, this event is fired for each frame in the web page and also for all the child documents (e.g. JS and CSS) that are loaded.
my question is how to detect the last entry of this event, I mean how to detect when the page is fully loaded , and this event is not firing again .
I looked for this a lot , I found a solution like this :
void webBrowser1_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
if (e.Url.Equals(webBrowser1.Url)) {
// Here the page is fully loaded
}
}
but this is not working with all the urls !
Anybody has an idea how to achieve that ?
thanx in advance