Im trying to figure out how to change the image of a toolbar button as the user hovers over the button - similar to word/excel etc etc. Is there a way of determining which button is being hovered over?
Im trying to figure out how to change the image of a toolbar button as the user hovers over the button - similar to word/excel etc etc. Is there a way of determining which button is being hovered over?
\\\
Imports System.Windows.Forms
..
..
..
Private Sub ToolBar1_MouseMove( _
ByVal sender As Object, _
ByVal e As MouseEventArgs _
) Handles Me.ToolBar1.MouseMove
Dim b As ToolBarButton
For Each b In Me.ToolBar1.Buttons
If b.Rectangle.Contains(New Point(e.X, e.Y)) Then
If Me.StatusBar1.Text <> b.ToolTipText Then
Me.StatusBar1.Text = b.ToolTipText
End If
Return
End If
Next b
End Sub
///
Thankyou VERY much - thats some elegant code. Had no idea that objects had a
'contains' method - fantastic stuff
--
~~~~~~~~~~~~~~~~~~
Just do something.
~~~~~~~~~~~~~~~~~~