Response to: How to change the color of a button on btnclick event
Revision 2
Just check out the following, maybe it will help you:
public void single_button_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
if (btn.BackColor == Color.Red)
{
btn.BackColor = SystemColors.Control;
}
else if (btn.BackColor == SystemColors.Control)
{
btn.BackColor = Color.Red;
}
}
Posted 14-Jan-13 23:40pm
by
shiny13.