Thanks for your help guys.
I got the code off of a tutorial I finally found on Google and I just copied the code from there.
It appears that I just had to change this:
Code:
public static Image favicon(Uri url)
into this:
Code:
public static Image favicon(String url)
Here's the full code:
Code:
public static Image favicon(String url)
{
Uri url = new Uri(u);
String iconurl = "http://" + url.Host + "/favicon.ico";
WebRequest request = WebRequest.Create(iconurl);
try
{
WebResponse response = request.GetResponse();
Stream s = response.GetResponseStream();
return Image.FromStream(s);
}
catch (Exception ex)
{
return Properties.Resources.LargeGlobe;
}
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
pictureBox5.Image = favicon(webBrowser1.Url.ToString());
}
Thanks again for the help guys!