DDRJeffP

I'm trying to write some code to load a webpage, wait for it to load, and then run some code. Here's the code I'm using:

 

WebBrowser1.Navigate("http://ccs.shop.wii.com/ccs/download/00010001" & ee & ff & gg & hh & cc & dd & aa & bb & "/FFFD0001") 'Load the webpage

Do Until WebBrowser1.Document.Title = "Apache Tomcat/4.1 - Error report" Or WebBrowser1.Document.Images.Count = 1 : Loop 'Wait until either an image loads (Images.Count = 1) or until the error page loads (Title = "Apache ...")

 

However, it just hangs when it gets to the loop. If I remove the loop the page loads fine. Any clue on what the problem is



Re: Visual Basic Express Edition Wait for a web page to load using web browser control?

ReneeC

Never, Never loop.

Use the documentCompleted event.






Re: Visual Basic Express Edition Wait for a web page to load using web browser control?

DDRJeffP

Thanks

 

I haven't used a VB since version 5.0 until lately, so I'm not up-to-date with all the new stuff