I use a control WebBrowser, there is an event called DocumentCompleted, this event is fired for every frame on the web page, as well as for all child documents (e.g. JS and CSS) that are loaded.
my question is how to determine the last record of this event, I mean how to determine when the page is fully loaded and this event no longer fires.
I searched a lot, I found a solution like this:
void webBrowser1_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
if (e.Url.Equals(webBrowser1.Url)) {
}
}
but this does not work with all urls!
Does anyone have an idea how to achieve this?
thanx in advance
source
share