C# 通过URL获取图片并显示在PictureBox上的方法
string url = string.Format(@"http://q1.qlogo.cn/g?b=qq&nk=8583048&s=100", 5, 123456); System.Net.WebRequest webreq = System.Net.WebRequest.Create(url); System.Net.WebResponse webres = webreq.GetResponse(); using (System.IO.Stream stream = webres.GetResponseStream()) { pictureBox1.Image = Image.FromStream(stream); }