标签颜色在​​C#(Debian OS [Rasberry Pi])中带到列表框背景色和控制框背景色。

时间:2019-02-22 04:04:42

标签: c# debian

此POP-Up在Windows上可以编译,但是如果我们在Debian上可以编译。

请显示图片

enter image description here Windows操作系统

enter image description here Debian OS(Rasberry PI)

public partial class ClearLabel : Label
{
    public ClearLabel() : base()
    {
        InitializeComponent();
        this.Paint += Init_Paint;
        this.SetStyle(ControlStyles.Opaque, true);
        this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
        this.Font = new Font("Arial", 12f, FontStyle.Regular);
        this.BringToFront();
        this.ForeColor = Color.White;
        this.BackColor = Color.Transparent;        
    }        
    private void Init_Paint(object sender, PaintEventArgs e)
    {
        Brush backgroundBrush = new SolidBrush(Color.FromArgb(FormMainScreen.GetInstance().nOpacity, 39, 40, 47));
        Graphics graphics = e.Graphics;
        Rectangle rtBound = this.ClientRectangle;
        graphics.FillRectangle(backgroundBrush, rtBound);
        this.BringToFront();
    }
    public ClearLabel(IContainer container)
    {
        container.Add(this);

        InitializeComponent();
    }

// n不透明度= 100;

0 个答案:

没有答案