Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Button's border colors?

I'm new to Visual Basic and I want to change the border color of a Button, but I don't see any option to do that in the IDE (Visual Studio 2017). Is there a way to do this?

like image 916
jSystem75 Avatar asked Dec 05 '25 18:12

jSystem75


1 Answers

The way to do this is not very obvious as the default Button doesn't allow for a coloured border.

First you have to set the Button's FlatStyle property to FlatStyle.Flat. Then you have to set the Button's FlatAppearance.BorderColor property to the colour of your choice.

You can do both of those things in the Visual Studio form designer if you want, or you can do it in code like this:

Button1.Flatstyle = FlatStyle.Flat
Button1.FlatAppearance.BorderColor = Color.Yellow
like image 133
Blackwood Avatar answered Dec 08 '25 21:12

Blackwood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!