Updating status bar text when mouse moves over toolbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Programming language = C

I need to display the action which a button performs when the mouse moves over a toolbar(containing buttons)
I tried using the toolbar_MouseMove event, but e.Button always returns "None", hence, it cannot be of use

Can any body throw some light on this issue

Alternately, can anybody guide as to when e.Button value in the toolBar_MouseMove event changes

Regard
Vipul
 
See my answer to your question under the dotnet.framework newsgroup

Jakob.
 
* "=?Utf-8?B?VmlwdWwgUGF0ZWw=?= said:
I need to display the action which a button performs when the mouse moves over a toolbar(containing buttons).
I tried using the toolbar_MouseMove event, but e.Button always returns "None", hence, it cannot be of use.

Quick and Dirty:

\\\
Private Sub ToolBar1_MouseMove( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs _
) Handles ToolBar1.MouseMove
Dim b As ToolBarButton
For Each b In Me.ToolBar1.Buttons
If b.Rectangle.Contains(New Point(e.X, e.Y)) Then
Me.Text = b.ToolTipText
Return
End If
Next b
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top