简体   繁体   English

"删除按钮边框窗口窗体"

[英]Remove button border windows forms

Is there a way to remove the white border of the button.I added an image to the button and I got this border.有没有办法删除按钮的白色边框。我在按钮上添加了一个图像,我得到了这个边框。 I tried with button1.FlatAppearance.BorderSize = 0;<\/code>我试过button1.FlatAppearance.BorderSize = 0;<\/code> but it doesn't work.但它不起作用。

图像1

img2

"

You need to set the button to use the flat appearance.您需要将按钮设置为使用平面外观。

button1.FlatStyle = FlatStyle.Flat;
button1.FlatAppearance.BorderSize = 0;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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