解决方案 »

  1.   

    是的,有什么好的解决办法吗?
    本想着把控件中画图采用矢量图画法,不用BMP,可是看了好象矢量图也是先创建一个BMP,再获取DC
      

  2.   


    Paint:
       b:new Bitmap....
       ...
       b.Dispose();
      

  3.   

    楼上的办法也会出问题
    我按照楼上办法修改如下:
            private void LineDrawer_Paint(object sender, PaintEventArgs e)  //重绘事件
            {
                    this.DrawMap();
            }        private void DrawMap()    //画图主程序
            {
                map = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height);
                gs = Graphics.FromImage(map);
                gs.Clear(Color.White);
                画图...
                gs.Dispose();
                map.Dispose();
                GC.Collect();
            }
    画出来的图是空白,而且会出错