Jump to content
  • Advertisement
Sign in to follow this  
Khaos Dragon

web browser problems

This topic is 4726 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having trouble getting my app to wait until the webbrowser has finished its operations before outputting its data. I quite simple loop until the webBrowser is not busy and for some reason it does not seem to be working.
//before this point webBrowser contains an older page we shall call A
object o = null;
webBrowser.Navigate( "http://www.google.com", ref o, ref o, ref o, ref o);
		
while( webBrowser.Busy )
    Application.DoEvents();

//ideally at this point the webBrowser should contain the page returned from google.com, we shall call it B

mshtml.HTMLDocumentClass doc = new mshtml.HTMLDocumentClass();
doc =   (mshtml.HTMLDocumentClass) webBrowser.Document;
textBox1.Text = doc.documentElement.innerHTML;
//the text that shows up in the textbox is from A, not B
//If I make a button which outputs the current webbrowser document to the textbox 
//and wait a few seconds and manually trigger it, then I get B in my textbox. From 
//my perspective it seems like the while( webBrowser.Busy ) loop is hardly being used


Share this post


Link to post
Share on other sites
Advertisement
Can you provide any details on what exactly is going on? What symptoms/behavior are you seeing that indicates that it isn't working?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!