简体   繁体   English

面板边框实心透明效果 c#

[英]panel Border solid transparent effect c#

I would like to know how to archieve this type of border panel effect on Winforms, i got the bottom line and right line already using the Fixed3d option, but no luck with the top and left side我想知道如何在 Winforms 上存档这种类型的边框面板效果,我已经使用 Fixed3d 选项得到了底线和右线,但顶部和左侧没有运气

在此处输入图像描述

I already got it with this code on the OnPaint event, if someone is looking for the same feel can look on this code example我已经在 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM