can someone tell me how to get the icon of a webpage. i can get the icon of a webpage and set it as an image but i want to take it and set it as the icon for my application. here is the code to get the icon and set it as a image
Dim url As Uri = New Uri(TextBox1.Text)
If url.HostNameType = UriHostNameType.Dns Then
' Get the URL of the favicon
' url.Host will return such string as www.google.com
Dim iconURL = "http://" & url.Host & "/favicon.ico"
' Download the favicon
Dim request As System.Net.WebRequest = System.Net.HttpWebRequest.Create(iconURL)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim stream As System.IO.Stream = response.GetResponseStream()
Dim favicon = Image.FromStream(stream)
' Display the favicon on PictureBox1
PictureBox1.Image = favicon
End If