将投向设置成圆形

mac2022-06-30  103

添加Paint事件,接着加入下列代码

//将头像设置成圆角 private void avatar_Paint(object sender, PaintEventArgs e) { GraphicsPath gp = new GraphicsPath(); gp.AddEllipse(avatar.ClientRectangle); Region region = new Region(gp); avatar.Region = region; gp.Dispose(); region.Dispose(); }

 

转载于:https://www.cnblogs.com/siyunianhua/p/8124333.html

相关资源:初一描写父亲的作文600字_精选.doc
最新回复(0)