Custom button unwanted border when form unselected

When you’re dealing with a custom button you should set:

button.TabStop = false;
button.FlatStyle = FlatStyle.Flat;
button.FlatAppearance.BorderSize = 0;

Then since ButtonBase doesn’t support the border color on Color.Transparent, you can overcome the issue by setting an Argb color:

button.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)