其他分享
首页 > 其他分享> > 设置pictureBox的边框颜色(转载)

设置pictureBox的边框颜色(转载)

作者:互联网

原文地址:https://www.cnblogs.com/hardsoftware/p/5720545.html

private void pictureBox2_Paint(object sender, PaintEventArgs e)   
{   
            PictureBox p = (PictureBox)sender;   
            Pen pp = new Pen(Color.Red);   
            e.Graphics.DrawRectangle(pp, e.ClipRectangle.X, 
            e.ClipRectangle.Y,
            e.ClipRectangle.X + e.ClipRectangle.Width - 1, 
            e.ClipRectangle.Y + e.ClipRectangle.Height - 1);   
}

 

标签:pictureBox,pp,sender,ClipRectangle,www,边框,Pen,PictureBox,转载
来源: https://www.cnblogs.com/shuaimeng/p/11603087.html