WebBrowser DocumentComplete event problems

K

Kfir Marouani

Hi,
I'm using the WebBrowser object, navigating to lets say www.ynet.co.il. I'm
trying to find out when the site was completely loaded, But when I use the
DocumentComplete event it comes up 16 (!) times. Also the StatusText
property of the object is always "Done".
So how can I find out when the page was really fully loaded?

Thanks in advance.
-Kfir
 
N

Nicholas Paldino [.NET/C# MVP]

Kfir,

Does the document contain Frames in it? If so, the DocumentComplete
event is going to fire for each of those frames (or IFrame tags as well, I
believe).

You should also check the Url property of the
WebBrowserDocumentCompletedEventArgs instance against the URL of the main
document you are trying to load. That should differ between all the firings
of the event.
 
K

Kfir Marouani

Thanks for the fast replay.

Another question. I am using the WebBrowser object given in VS 2005 toolbox.
Therefore it doesn't using the regular screen of IE (With the progress bar
and everything). Is there any way I can use the regular IE screen?

Nicholas Paldino said:
Kfir,

Does the document contain Frames in it? If so, the DocumentComplete
event is going to fire for each of those frames (or IFrame tags as well, I
believe).

You should also check the Url property of the
WebBrowserDocumentCompletedEventArgs instance against the URL of the main
document you are trying to load. That should differ between all the
firings of the event.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Kfir Marouani said:
Hi,
I'm using the WebBrowser object, navigating to lets say www.ynet.co.il.
I'm trying to find out when the site was completely loaded, But when I
use the DocumentComplete event it comes up 16 (!) times. Also the
StatusText property of the object is always "Done".
So how can I find out when the page was really fully loaded?

Thanks in advance.
-Kfir
 
N

Nicholas Paldino [.NET/C# MVP]

Kfir,

You are going to have to create those controls yourself. The WebBrowser
control should have most of the events and methods you need in order to feed
your own UI.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Kfir Marouani said:
Thanks for the fast replay.

Another question. I am using the WebBrowser object given in VS 2005
toolbox. Therefore it doesn't using the regular screen of IE (With the
progress bar and everything). Is there any way I can use the regular IE
screen?

Nicholas Paldino said:
Kfir,

Does the document contain Frames in it? If so, the DocumentComplete
event is going to fire for each of those frames (or IFrame tags as well,
I believe).

You should also check the Url property of the
WebBrowserDocumentCompletedEventArgs instance against the URL of the main
document you are trying to load. That should differ between all the
firings of the event.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Kfir Marouani said:
Hi,
I'm using the WebBrowser object, navigating to lets say www.ynet.co.il.
I'm trying to find out when the site was completely loaded, But when I
use the DocumentComplete event it comes up 16 (!) times. Also the
StatusText property of the object is always "Done".
So how can I find out when the page was really fully loaded?

Thanks in advance.
-Kfir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top