这样说吧,我是想在一个pictureBox上画图,但是要是用
Graphics g= pictureBox.creatGraphics;就总是有点问题
这样我就想用Graphics g = new Graphics;
但这样就画不到pictureBox上,请达人帮我想个办法,怎么解决这个问题啊??

解决方案 »

  1.   

    Graphics g= pictureBox.creatGraphics;就总是有点问题有什么问题啊,不这样怎么能在pictureBox画图啊
      

  2.   

    private void Build_Click(object sender, System.EventArgs e)
    {
    pictureBox.Width = 1000;
    pictureBox.Height = 1000;
    Graphics g = pictureBox.CreateGraphics();
    Pen pen = new Pen(Color.Black,3);
    g.DrawRectangle(pen,10,10,500,10); }
    主要我在前面设了一下pictureBox的大小就老是出现这个问题,第一次选菜单就是只闪一下,再选一次就断了
      

  3.   

    一拖一下滚动条就没了.这个就必须在paint事件才能解决的!!!