for (int x = 1; x <= width; x++) 
{
  g.FillRectangle(Brushes.Transparent, new Rectangle(width - i, 0, Width, Height));
}
没调试~~你测试下

解决方案 »

  1.   

    int width = this.MyBitmap.Width; //图像宽度 
                int height = this.MyBitmap.Height; //图像高度 
                Graphics g = this.panel1.CreateGraphics();
                g.Clear(Color.Gray); //初始为全灰色 
                for (int x = 1; x <= width; x++)
                {
                    g.DrawImage(MyBitmap, new Rectangle(0, 0, x, height), new Rectangle(0, 0, x, height), GraphicsUnit.Pixel);
                    Thread.Sleep(10);
                }
      

  2.   

    http://blog.csdn.net/yanleigis/archive/2007/10/18/1830995.aspx
      

  3.   

    http://blog.csdn.net/yanleigis/archive/2007/10/18/1830995.aspx
      

  4.   

    http://blog.csdn.net/yanleigis/archive/2007/10/18/1830995.aspx
      

  5.   

    for (int x = 1; x <= width; x++) 

      g.FillRectangle(Brushes.Transparent, new Rectangle(0, x, Width, Height)); 
      

  6.   


    错了for (int x = 1; x <= width; x++) 

    g.FillRectangle(Brushes.Transparent, new Rectangle(0, 0, X, Height)); 
      

  7.   

    谢谢 楼上  不过还是没反转过来  我代码是这样的
    public void turnPageLeft(Image ims)
    {
    int width=ims.Width;
    int height=ims.Height;
    Bitmap MyBitmap=new Bitmap(ims,ims.Width,ims.Height);
    Graphics g=this.pictureBox1.CreateGraphics();
    g.Clear(Color.Gray);
    for(int x=1;x<=width;x++)
    {
    Bitmap im=MyBitmap.Clone(new Rectangle(0,0,x,height),System.Drawing.Imaging.PixelFormat.Format24bppRgb);

    g.FillRectangle(Brushes.Transparent,new Rectangle(0,0,x,height));
    //g.DrawImage(im,new Rectangle(0,0,x,height),new Rectangle(0,0,x,height),GraphicsUnit.Pixel);
    g.DrawImage(im,0,0);
    //System.Threading.Thread.Sleep(1);
    }
    }
      

  8.   

    Bitmap MyBitmap = Bitmap.FromFile("c:\\a.bmp") as Bitmap;
    //改变图像大小为panel1的大小
    MyBitmap = new Bitmap(MyBitmap, this.panel1.Size);
    int width = MyBitmap.Width; //图像宽度 
    int height = MyBitmap.Height; //图像高度 
    Graphics g = this.panel1.CreateGraphics();
    g.Clear(Color.Gray); //初始为全灰色 
    for (int x = width - 1; x >= 1; x--)
    {
        Bitmap bitmap = MyBitmap.Clone(new Rectangle
            (x, 0, width - x, height)
            System.Drawing.Imaging.PixelFormat.Format24bppRgb);
        g.DrawImage(bitmap, x, 0);
        System.Threading.Thread.Sleep(10);
    }搂主这样运行就可以了,不妨试试。
      

  9.   

    注意这里:for (int x = width - 1; x >= 1; x--) 步进值是-1,倒着循环的