C# WinForm修改Panel边框颜色

private void panel1_Paint(object sender, PaintEventArgs e)
{
    ControlPaint.DrawBorder(e.Graphics,
                                this.panel1.ClientRectangle,
                                Color.LightSeaGreen,//7f9db9
                                1,
                                ButtonBorderStyle.Solid,
                                Color.LightSeaGreen,
                                1,
                                ButtonBorderStyle.Solid,
                                Color.LightSeaGreen,
                                1,
                                ButtonBorderStyle.Solid,
                                Color.LightSeaGreen,
                                1,
                                ButtonBorderStyle.Solid);
}

 

posted @ 2013-12-19 15:46  天际翔龙  阅读(16978)  评论(0编辑  收藏  举报