Tuesday, June 21, 2011

Synchronous WebBrowser control navigating

For the random people that stumble upon this blog, this article relates to the .NET framework's "WebBrowser" class which basically allows a programmer to use internet explorer within his application.  In fact, you can create 10 instances of IE and programmatically make them perform a task, if you want to.

This is some high-level goodness provided by programming languages like C# and Visual Basic, aka the butter-knife of programming languages.  You might enjoy this humerous photo:

Often times subscribing to an event just isn't synchronous enough, one common case is navigating to a web page using the WebBrowser control.

To make it behave synchronously, this snippet is of use:

while (this.webBrowser.ReadyState != WebBrowserReadyState.Complete)


  1. Thats kind of neat. Sadly i don't know what any of it means.

  2. Nice pictorial representation of the tools of the trade :) C++ looks like the ultimate winner, but you gotta have some super-human agility to use it to its full extent.

  3. Good shit.

    Hahaha Java/C#, butterknife.