110,530
社区成员
发帖
与我相关
我的任务
分享
using System.Net;
private void button1_Click(object sender, EventArgs e)
{
HttpWebRequest vHttpWebRequest = (HttpWebRequest)WebRequest.Create(
@"http://www.sina.com.cn/favicon.ico");
HttpWebResponse vHttpWebResponse = (HttpWebResponse)vHttpWebRequest.GetResponse();
Image vFavicon = Image.FromStream(vHttpWebResponse.GetResponseStream());
pictureBox1.Image = vFavicon;
vHttpWebResponse.Close();
}
<link rel=”icon” href=”/dir/favicon.ico” mce_href=”/dir/favicon.ico” type=”image/x-icon”>
<link rel=”shortcut icon” href=”/dir/favicon.ico” mce_href=”/dir/favicon.ico” type=”image/x-icon”>
Firefox还支持GIF动画格式的Favicon,使用方法如下:<link rel="shortcut icon" href="favicon.ico" >
<link rel="icon" href="animated_favicon.gif" type="image/gif" >