完全透明的按钮,只在鼠标经过时显示边框线。
属性Button.Image设置图片按钮,可与背景完美结合。

 

C#透明按钮设置

 public void setButtonStyle(Button btn)
        {
            btn.ForeColor = Color.Transparent;
            btn.BackColor = Color.Transparent;
            btn.FlatStyle = FlatStyle.Flat;
            btn.FlatAppearance.BorderSize = 0;
            btn.FlatAppearance.MouseOverBackColor = Color.Transparent;
            btn.FlatAppearance.MouseDownBackColor = Color.Transparent;
        }

 

相关文章:

  • 2022-01-16
  • 2021-08-07
  • 2022-12-23
  • 2021-05-10
  • 2021-11-10
  • 2022-02-11
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2021-12-19
  • 2022-12-23
  • 2021-07-06
  • 2021-11-02
相关资源
相似解决方案