设置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);   
}

 

上一篇:PP图|QQ图|正态性检验|K-S检验|S-W检验|


下一篇:uniapp scroll-view横向滚动 底部自定义滚动条