我是 Visual Basic 的新手,我想更改 Button
的边框颜色,但我在 IDE (Visual Studio 2017) 中看不到任何执行此操作的选项。有办法做到这一点吗?
最佳答案
执行此操作的方法不是很明显,因为默认的 Button
不允许使用彩色边框。
首先,您必须将Button
的FlatStyle
属性设置为FlatStyle.Flat
。然后,您必须将 Button
的 FlatAppearance.BorderColor
属性设置为您选择的颜色。
如果需要,您可以在 Visual Studio 窗体设计器中完成这两件事,或者您可以在代码中完成,如下所示:
Button1.Flatstyle = FlatStyle.Flat
Button1.FlatAppearance.BorderColor = Color.Yellow
关于vb.net - 如何改变按钮的边框颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44815270/