首页 文章

无法更改按钮的整个背景颜色

提问于
浏览
0

我无法更改按钮的整个背景颜色 . 我在属性中更改它 .

有人知道如何解决这个问题吗?

Klick this link to see a picture of this problem

3 回答

  • 0

    这是因为按钮的平面样式,将FlatStyle更改为Flat,

    并在FlatAppearence中将BorderSize更改为0以摆脱边框

  • 0

    您应该设置属性组合:

    this.button1.BackColor = System.Drawing.Color.Red;
    this.button1.FlatAppearance.BorderSize = 0;
    this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
    this.button1.UseVisualStyleBackColor = false;
    

    你会得到这个:

  • 0

    更改突出显示的属性:

    它会给你一个这样的按钮(我的红色):

相关问题