C#自定义圆形PictureBox控件

public class CtrlRoundPictureBox : PictureBox
    {
        protected override void OnCreateControl()
        {
            GraphicsPath gp = new GraphicsPath();
            gp.AddEllipse(this.ClientRectangle);
            Region region = new Region(gp);
            this.Region = region;
            gp = null;
            region = null;
            base.OnCreateControl();
        }
    }

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页