If I run this (In Form1_Load, having written no other code in the project):
Color buttonOriginalColor = button1.BackColor;
button1.BackColor = buttonOriginalColor;
the button appears white on the form. If I comment out the second line (or comment out both lines or run it with no code at all written by me in the whole Form application project):
Color buttonOriginalColor = button1.BackColor;
now the button comes out the normal gray color, which is slightly darker than I get with the first code. This is also the same color that is shown in the designer.
In both cases, If I put a breakpoint at the end of Form1_Load and look at button1.BackColor , it shows up as Color "{Control,ARGB=(255,240,240,240)}" .
Why does setting the button control BackColor to its own value result in it changing color? Is there something wrong with my installation of Visual Studio 2017 ?
What I have tried:
Nothing. I just want to understand why it is changing the color when I set button1.BackColor to its own value.