悟生慧

 

c#windows 应用程序picturebox形状怎样变成圆形

        using System.Drawing.Drawing2D;
        private void button1_Click(object sender, EventArgs e)
        {
            GraphicsPath gp = new GraphicsPath();
            gp.AddEllipse(pictureBox1.ClientRectangle);
            Region region = new Region(gp);
            pictureBox1.Region = region;

            pictureBox2.Region=region;

            pictureBox3.Region=region;
            gp.Dispose();
            region.Dispose();
        }

posted on 2012-01-05 09:23  悟生慧  阅读(7926)  评论(0编辑  收藏  举报

导航