您的位置:首页 > 编程语言 > C#

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

2012-01-05 09:23 274 查看
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();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: