实现效果:
知识运用:
Graphics类中的DrawPie方法
public void DrawPie (Pen pen,Rectangle rectangle, startAngle, float sweepAngle)
public void DrawPie (Pen pen, int x,int y int width ,int height, int startAngle ,int sweepAngle)
实现代码:
private void button1_Click(object sender, EventArgs e) { Graphics g = this.CreateGraphics(); Pen myPen = new Pen(Color.Black,2); g.DrawPie(myPen,30,20,200,140,0,240); }