Thank you for your very quick solution - it works!
However, now that you have persuaded me that it is feasible to host a WebBrowser in a class library, I am tempted to use the GeckoWebBrowser (see http://geckofx.org/) because it operates completely independently of IE. However, when I try your code above
with GeckoWebBrowser it refuses to Navigate() until the window handle has been assigned.
Can you suggest any elegant way of faking this in a class library? (Sorry, I appreciate that this is a completely different question and I will post it separately if necessary).
Main Topics
Browse All Topics





by: tgerbertPosted on 2009-02-23 at 08:35:09ID: 23712953
I can't answer your question directly, however you should be able to use the WebBrowser control in a class library without any forms. You will, however, need a reference to System.Windows.Forms. Example below has a simple class that just gets the title of a web page:
Select allOpen in new window