暂时先参考这个东东..http://www.codeproject.com/csharp/zoomnet.asp

解决方案 »

  1.   

    实际上很简单就是StretchBlt的调用.
    [DllImport("User32.dll")] 
    public extern static System.IntPtr GetDC(System.IntPtr hWnd); 
    [DllImport("user32.dll")]
    static public extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
    [DllImport("gdi32.dll")]
    static public extern bool StretchBlt(IntPtr hDCDest, int XOriginDest, int YOriginDest, int WidthDest, int HeightDest,
    IntPtr hDCSrc,  int XOriginScr, int YOriginSrc, int WidthScr, int HeightScr, uint Rop);
    private void button1_Click(object sender, System.EventArgs e)
    {
        IntPtr hdc1 = GetDC(this.pictureBox1.Handle); //PictureBox1的HDC
        IntPtr hdc2 = GetDC(this.pictureBox2.Handle); //PictureBox2的HDC    //将PBox1拷到PBox2中
        StretchBlt(hdc2,0,0,100,100,hdc1,10,10,100,100,(uint)0x00CC0020);    //释放
        ReleaseDC((IntPtr)null,hdc1);
        ReleaseDC((IntPtr)null,hdc2);}
      

  2.   

    to aspcn(飞刀) 我是想用C#自己的方法,用API我也会一点,只是对C#学习没啥好处了..比如:
     Graphics g = pic.CreateGraphics();    //C#自已的方法
     Graphics gt =picTo.CreateGraphics ();   IntPtr hdc1=g.GetHdc();
     IntPtr hdc2=gt.GetHdc();   //C#自已的方法
     
    //将PBox1拷到PBox2中  ***** 这个API有没有C#自已的方法呢???? StretchBlt(hdc2,0,0,100,100,hdc1,10,10,100,100,(uint)0x00CC0020);