BlakeMcKenna
asked on
Using the MouseHover Event?
I have a Windows Form that have a lot of Buttons on it. I want to be able to change the default color to another color when the Mouse hovers over a button and then have the default color restored when the Mouse isn't over the button. I can do it when the Mouse is hovering over a button but not sure how to handle it when it's NOT over a button. Are there events for when the Mouse isn't hovering or do I need to create custom code?
Thanks!
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
James,
What I'm wanting to do is give the user a visual representation of when a certain button is enabled. So, I'm thinking that when a button IS enabled and the mouse hovers over it....it will change to the specified color. Doesn't the MouseEnter Event fire when the button is clicked on or the button has focus and the Enter key is pressed?
What I'm wanting to do is give the user a visual representation of when a certain button is enabled. So, I'm thinking that when a button IS enabled and the mouse hovers over it....it will change to the specified color. Doesn't the MouseEnter Event fire when the button is clicked on or the button has focus and the Enter key is pressed?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ah Ok....my mistake...I thought the MouseEnter Event fired when the button was clicked.
Thanks guys for your help!
Thanks guys for your help!
Instead, change the BackColor on MouseEnter, and reset it to its original value on MouseLeave.