what i am trying to do is
1)Whenever i move my mouse over button it's color should be
Blue.
2)when my mouse leaves the button it's color should become
normal.
3)Whenever i move my mouse over button it's color should be
Blue
4)Then when i click that button its color should be changed to
Red.
5)after button click when my mouse leaves the button its color should be
red itself.
6)next time when i move my mouse over the button it's color should become
blue.
7)Then when my mouse leaves the button its color should be
red itself
Here i got all the 6 steps and now i need to get the 7th step.. how do i do it.
Thank you in advance.
What I have tried:
for 1,2,3,5 and 6 steps
private void btnDateTime_MouseHover(object sender, EventArgs e)
{
if (btnDateTime.BackColor != Color.Empty && btnDateTime.BackColor != Color.Red)
{
btnDateTime.BackColor = Color.Blue;
}
if (btnDateTime.BackColor == Color.Red)
{
btnDateTime.BackColor = Color.Blue;
}
}
for 4th step
private void btnDateTime_Click(object sender, EventArgs e)
{
btnHi.Visible = true;
if(btnDateTime.BackColor == Color.Blue)
{
btnDateTime.BackColor = Color.Red;
}
else
{
btnDateTime.BackColor = default(Color);
}
}
for 7th step what should i do??