网站首页 博客 C#重绘pictureBox边框
C#重绘pictureBox边框
 2020-03-14 11:22:43  管理员  390

绑定事件

this.pictureBox_signimage.Paint += pictureBox_signimage_Paint;

重绘边框

//重绘pictureBox_signimage边框
void pictureBox_signimage_Paint(object sender, PaintEventArgs e)
{
	PictureBox p = (PictureBox)sender;
	Pen pp = new Pen(Color.LightGray);
	e.Graphics.DrawRectangle(pp, e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.X + e.ClipRectangle.Width - 1,e.ClipRectangle.Y + e.ClipRectangle.Height - 1);
}


来说两句吧
最新评论