-
February 17th, 2011, 03:11 PM
#1
BackColor unchanged with Mouse Hover
Hi,
I wanna know how to keep the BackColor value of a button controller unchanged even moving mouse pointer over the button (MouseHover event). I've searched for a solution over many forums but most of them said set the values as follows.
void Button1MouseEnter(object sender, EventArgs e)
{
button1.UseVisualStyleBackColor = false;
button1.BackColor = Color.Lavender;
}
void Button1MouseLeave(object sender, EventArgs e)
{
button1.UseVisualStyleBackColor = true;
button1.BackColor = Color.Lavender;
}
But this doesn't work . Can anyone please help me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|