怎么用c#画
1.点
2.椭圆
3.多义线
4.自由线

解决方案 »

  1.   

    在 paint事件中:private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
    {
       Graphics g= e.Graphics;
       using (GraphicsPath grp=new GraphicsPath())
     {
    grp.AddEllipse(100,200,300,522);
    g.DrawPath(Pens.Black,grp);
     }
    }
    这是椭圆的画法,别的类似
    只要把AddEllipse换成别的就行了
      

  2.   

    这个一下说不清楚
    建议看msdn
      

  3.   

    GDI+ 查MSDN的System.Drawing.Drawing2D;和System.Drawing两个命名空间,暴多,而且很容易。你的要求加起来只要20行左右。
      

  4.   

    Graphics g= this.panel1.CreateGraphics();   
    using (GraphicsPath grp=new GraphicsPath())
    {
    grp.AddEllipse(100,200,300,522);
    g.DrawPath(Pens.Black,grp);
    }
      

  5.   

    重载Panel的OnPaint方法。
    在视图设计器选择panel,按F4,在事件里双击Paint事件。
      

  6.   

    我是在菜单栏里面选中画的
    但是窗体以改变就有不行了
    this.Paint +=new PaintEventHandler(Form1_Paint); 
    Form1_Paint

    Graphics g= this.panel1.CreateGraphics();   
    using (GraphicsPath grp=new GraphicsPath())
    {
    grp.AddEllipse(100,200,300,522);
    g.DrawPath(Pens.Black,grp);
    }

    这个它是启动窗体就画  ~~~我想在我点击菜单的时候在画