Raj Chudasama wrote:
> Well i guess it will depend on what win version you are using, i am on XP
> and it does the hover states. However mine are custom buttons that are
> dropped on a picturebox and events tied to them.
>
> Nonetheless, i got it figured out
>
All you need to do is handle MouseEnter and MouseLeave for the buttons.
In the MouseEnter, set a boolean or something to indicate that the
hover graphic should be used and in the mouseLeave, it indicates the
normal unclicked graphic.
Then, in the MouseUp, you display the correct one.
Private bUseHoverGraphic As Boolean
Public Sub MouseEnter(...)
bUseHoverGraphic = True
End Sub
Public Sub MouseLeave(...)
bUserHoverGraphic = False
End Sub
Public Sub MouseUp(...)
If bUserHoverGraphic Then
'Paint button with hover graphic
Else
'Paint button with normal graphic
End If
End Sub
|