Danie
Danie

Reputation: 163

Remove gap between button border and background image

I want to implement some navigation buttons (no text, only image, like flat button).

I add default button with BackgroundImage property. And it has a small gap between border and image.

How can I remove that gap?

Upvotes: 1

Views: 482

Answers (3)

Amit
Amit

Reputation: 1857

As far i got your concern. You need to set two properties of Button.

  1. button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  2. button1.FlatAppearance.BorderSize = 0;

Upvotes: 2

Héctor M.
Héctor M.

Reputation: 2392

Set FlatStyle to Flat

button1.FlatStyle = FlatStyle.Flat;

Upvotes: 0

Kashif Sohail
Kashif Sohail

Reputation: 304

Set border property to None will make the button fully flat and just flat image will be shown

Upvotes: 0

Related Questions