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; but it doesn't work.

img1

img2

Upvotes: 6

Views: 17147

Answers (1)

Tobbs
Tobbs

Reputation: 1150

You need to set the button to use the flat appearance.

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

Upvotes: 14

Related Questions