用Bitmap类指定路径创建一个实例
然后把picturebox 的 image属性设为这个实例

解决方案 »

  1.   

    把你的GIF文件做为嵌入的资源编译进EXE文件,然后用的时候再读出来:see;嵌入的资源---------------------右键资源管理器--添加现有项目(添加一个名为123的GIF图片)选中图片,在属性栏中把“生成操作”设为“嵌入的资源”代码:System.Reflection.Assembly thisExe;
    thisExe = System.Reflection.Assembly.GetExecutingAssembly(); //WindowsApplication1为程序集的命名空间
    //123.GIF为图片的名字
    System.IO.Stream file = thisExe.GetManifestResourceStream 
                         
                          ("WindowsApplication1.123.jpg");this.pictureBox1.Image = Image.FromStream(file);
      

  2.   

    用image.fromfile(完整文件路径)方法可以,但不会把文件一块编绎到EXE文件内.see:
    http://blog.csdn.net/lizanhong/archive/2004/09/10/100812.aspx
      

  3.   

    不好意思,这里文件名写错了一下:System.IO.Stream file = thisExe.GetManifestResourceStream 
                         
                          ("WindowsApplication1.123.jpg");应该是:System.IO.Stream file = thisExe.GetManifestResourceStream 
                         
                          ("WindowsApplication1.123.gif");