[英]panel Border solid transparent effect c#
我已經在 OnPaint 事件中使用此代碼獲得了它,如果有人正在尋找相同的感覺,可以查看此代碼示例
private void panel1_Paint(object sender, PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics, panel1.ClientRectangle,
Color.White, 2, ButtonBorderStyle.Solid,
Color.White, 2, ButtonBorderStyle.Solid,
Color.FromArgb(100,160,160,160), 2, ButtonBorderStyle.Solid,
Color.FromArgb(100, 160, 160, 160), 2 ButtonBorderStyle.Solid);
ControlPaint.DrawBorder(e.Graphics, panel1.ClientRectangle,
Color.FromArgb(100, 160, 160, 160), 1, ButtonBorderStyle.Solid,
Color.FromArgb(100, 160, 160, 160), 1, ButtonBorderStyle.Solid,
Color.White, 1, ButtonBorderStyle.Solid,
Color.White, 1, ButtonBorderStyle.Solid)
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.