showing tool tip texts

How do I show a tooltip text in the status bar when the mouse is over a menu item?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

saka123Connect With a Mentor Commented:
Hi there ,

I hope I have been able to understand the problem Right .
Add a tool bar and a  status bar to a form and add a few Button to the toolbar with their Show tooltips check box  enabled. Then add the following code to mouse move event of toolbar .
Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim n As Integer
Dim wid As Long
wid = Toolbar1.ButtonWidth
For n = 1 To Toolbar1.Buttons.Count
If x > n * wid And x < (n + 1) * wid Then
   If n = Toolbar1.Buttons.Count Then
      StatusBar1.Panels(1).Text = Toolbar1.Buttons(n).ToolTipText
      StatusBar1.Panels(1).Text = Toolbar1.Buttons(n + 1).ToolTipText
      Exit Sub
   End If
ElseIf x < wid Then
   StatusBar1.Panels(1).Text = Toolbar1.Buttons(1).ToolTipText
    Exit Sub
End If

End Sub

<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>..I have dynamically gathered the number of toolbar buttons and their width(Assumed equal).Then tooltip show according to X parameter .
Consider Y parameter as well if there are two or more rows of buttons .

Hope this helps. keep me updated .


Sub menu1_MouseOver()

  Form1.caption = "You are about to select menu1."

End Sub

sub Form1_MouseOver()

  Form1.caption = app.title & " " & app.major & "." & app.minor
' this will set the caption back to the app name when your mouse leaves the menu

End Sub
mhdhallakAuthor Commented:
Does this need VB 6.0?
Because I have 5.0 and I tried it but nothing showed up!!
mhdhallakAuthor Commented:
I am afraid you did not understand my question right.

My question was about showing the tooltips texts in the status bar when the mouse is over a MENU item. You know, like the menues in Windows Explorer.

Do any of you guyz know how to do that?
All Courses

From novice to tech pro — start learning today.