我想在VB.Net中画一个圆圈
发布时间:2020-12-17 07:18:22 所属栏目:百科 来源:网络整理
导读:Private Sub PictureBox1_Paint(ByVal sender As System.Object,ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint e.Graphics.DrawEllipse(Pens.AliceBlue,New Rectangle(New Point(0,0),New Size(PictureBox1.Width,PictureBox1
Private Sub PictureBox1_Paint(ByVal sender As System.Object,ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint e.Graphics.DrawEllipse(Pens.AliceBlue,New Rectangle(New Point(0,0),New Size(PictureBox1.Width,PictureBox1.Height))) End Sub 我想在VB.Net,.Net版本4中绘制一个圆圈. 解决方法
尝试使用:
e.Graphics.DrawEllipse(Pens.AliceBlue,e.ClipRectangle); 它对我有用. e.Graphics.DrawEllipse( Pens.AliceBlue,pictureBox1.Width-1,pictureBox1.Height-1); 要么 Rectangle rect = e.ClipRectangle; rect.Inflate(-1,-1); e.Graphics.DrawEllipse(Pens.AliceBlue,rect); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |