private void Form5_Load(object sender, System.EventArgs e)
{
  System.Windows.Forms.PictureBox pbSource = new System.Windows.Forms.PictureBox();
  System.Drawing.Image image = System.Drawing.Image.FromFile("http://img.pet.qq.com/new05/a23.gif");
  pbSource.Image = image;
  pbSource.Size = new Size(100, 100);
  pbSource.Location = new Point(10, 10);
  this.Controls.Add(pbSource);
}以上是错误代码,只是为了表达意思。主要是为了获取http://img.pet.qq.com/new05/a23.gif这张图片显示,并保存下来。

解决方案 »

  1.   

    .NET Framework 类库  
    WebClient.DownloadFile 方法  
    将具有指定 URI 的资源下载到本地文件。  重载列表 
    名称  说明  
    WebClient.DownloadFile (String, String)  将具有指定 URI 的资源下载到本地文件。  
    WebClient.DownloadFile (Uri, String)  将具有指定 URI 的资源下载到本地文件。   请参见 
    参考 
    WebClient 类 
    WebClient 成员 
    System.Net 命名空间