View Single Post
  #2 (permalink)  
Old 12-07-2008, 4:25 PM
JohnH's Avatar
JohnH JohnH is online now
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,328
Reputation: 1315
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

It is too soon to do anything right after the Navigate call, after that a lot happens with the browser. I'm sure you've witnessed anything from short to long delays before a document display when you are browsing the internet, also called "load time". What happens is that the browser connects to the other site and request a document, which it download and parses the content for, any other resources specified in the document source like script files, style sheets and images is downloaded, things are finally rendered to the combination of elements that displays in the browser window. The Navigate call does not block and wait until all this is done before returning, it returns immediately and will notify clients like you about changes in the browser state using events. What you have to do is to listen to the DocumentCompleted event, here you must check the browsers ReadyState property and see that it reports "Complete" before you attempt to access the Document tree programmatically.
__________________
Reply With Quote