Reputation: 47
I can't change the whole background color for a button. I change it in the properties.
Does someone know how to fix this?
Upvotes: 0
Views: 2269
Reputation: 1572
that's because of the button's flat style, change the FlatStyle to Flat,
and in FlatAppearence change BorderSize to 0 to get rid of the border
Upvotes: 0
Reputation: 301
Alter the properties highlighted:
It will give you a button like this (I had mine red):
Upvotes: 4
Reputation: 1124
You should set a combination of properties:
this.button1.BackColor = System.Drawing.Color.Red;
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.UseVisualStyleBackColor = false;
and you'll get this:
Upvotes: 0