CsharpHome  

protected override void OnPaint(PaintEventArgs pe)
        {
            System.Drawing.Drawing2D.GraphicsPath shape = new System.Drawing.Drawing2D.GraphicsPath();
            shape.AddEllipse(0, 0, this.Width, this.Height);
            this.Region = new System.Drawing.Region(shape);
            //pe.Graphics.FillPath(new SolidBrush(Color.Black), shape);
            pe.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, this.Width, this.Height);
        }

posted on 2010-11-08 10:43  CsharpHome  阅读(100)  评论(0)    收藏  举报