Flicker free drawing using GDI+ and C#
http://www.codeproject.com/cs/media/flickerFreeDrawing.asp

解决方案 »

  1.   

    我的问题解决了,
    protected override void OnPaint(PaintEventArgs e)
    {
        Bitmap memBmp = new Bitmap(this.ClientRectangle.Width, this.ClientRectangle.Height);
        Graphics gs = Graphics.FromImage(bitmap);
        // draw using gs
        ....
        //
        e.Graphics.DrawImage(memBmp,0,0);
        memBmp.Dispose();
        gs.Dispose();
    }
    但是不是用
    http://www.codeproject.com/cs/media/flickerFreeDrawing.asp
    这个上面的方法,这个上面的方法弄不懂,
    using GDIDB; // Declare the namespace
      
     public class MainWnd : System.Windows.Forms.Form
    {
         ... Some other code
        private DBGraphics memGraphics;
         ... Some other code
          
        public MainWnd()
        {    
            memGraphics = new  DBGraphics();
        }           
         
    };连GDIDB这个namespace都找不到哦
      

  2.   

    忘了,还要加上一句
    this.SetStyle(ControlStyles.DoubleBuffer|ControlStyles.UserPaint|ControlStyles.AllPaintingInWmPaint,true);