Hi, there. Does anybody know how to check if the color is " 64, 64, 255" and then change it to my preferred color? Let's say that when I run a program and I press a button to change all the colors, all the colors that were specified in the code will be executed and all the colors will changed. Here's the code that don't work:
Code:
private void Color_Switcher_Click(object sender, System.EventArgs e)
{
if(BackColor = Color.FromArgb( 64, 64, 255))
{
BackColor = Color.FromArgb( 64, 255, 64);
TimedEvents.BackColor =
Color.FromArgh(128, 255, 128);
NonTimedEvents.BackColor =
Color.FromArgb(128, 255, 128);
Color_Switcher.BackColor =
Color.FromArgb( 64, 255, 64);
Color_Switcher.Text = "Change too blue!" ;
GoodBye.BackColor =
Color.FromArgb( 64, 255, 64);
Shrink.BackColor =
Color.FromArgb( 64, 255, 64);
}
else
{
BackColor = Color.FromArgb( 64, 64, 255);
TimedEvents.BackColor =
Color.FromArgh(128, 128, 255);
NonTimedEvents.BackColor =
Color.FromArgb(128, 128, 255);
Color_Switcher.BackColor =
Color.FromArgb( 64, 64, 255);
Color_Switcher.Text = "Change too blue!" ;
GoodBye.BackColor =
Color.FromArgb( 64, 64, 255);
Shrink.BackColor =
Color.FromArgb( 64, 64, 255);
}
}
Can anybody please help with the if statement? This is the code for telling the program if the color is "64,64,255" or "64,255,64".
Thank you!
-Grayson