pictureBox1.ImageLocation = "http://zi.csdn.net/2007.04/2007[1].4.180[120x60]2.gif";
如果没有的话,可以用HttpRequest来打开一个网络文件流,然后加载图片

解决方案 »

  1.   

    同意楼上的,可以用HttpRequest以二进制格式获取图片,然后解析绑定到控件上。
    具体操作可查相关资料。
      

  2.   

    雪狐大哥:
    >>pictureBox1.ImageLocation = "http://zi.csdn.net/2007.04/2007[1].4.180[120x60]2.gif";
    >>如果没有的话,可以用HttpRequest来打开一个网络文件流,然后加载图片
    我就是不知道怎样来获取图片的网络文件流,能不能提供点具体操作,谢谢啦!
      

  3.   

    filename = System.Environment.CurrentDirectory + "\\temp\\" + "xxx.bmp";
    url = "http://www.163.com/xxx.bmp";
    SavePhotoFromUrl(filename, url);public static bool SavePhotoFromUrl(string FileName, string Url)
            {
                bool Value = false;
                WebResponse response = null;
                Stream stream = null;            try
                {
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);                response = request.GetResponse();
                    stream = response.GetResponseStream();                if (!response.ContentType.ToLower().StartsWith("text/"))
                    {
                        Value = SaveBinaryFile(response, FileName);                }            }
                catch (Exception err)
                {
                    string aa = err.ToString();
                }
                return Value;
            }
      

  4.   

    高手们:现在有发现了一个问题,如果 url = "http://www.163.com/xxx.bmp"; 确实是可以象上面那样弄.但如果 url="http://mt2.google.com/mt?n=404&v=ap.48&x=3427&y=1755&zoom=5" 呢? 似乎象上面那样做行不通.还请您们能指点一二,谢了.在IE地址栏中输入 "http://mt2.google.com/mt?n=404&v=ap.48&x=3427&y=1755&zoom=5", 可以看到图片.