showing tool tip texts

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

[Webinar] Streamline your web hosting managementRegister Today

x
 
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
   Else
      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
Next

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 .

Bye






0
 
fibdevCommented:
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
0
 
mhdhallakAuthor Commented:
Does this need VB 6.0?
Because I have 5.0 and I tried it but nothing showed up!!
0
 
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?
0
All Courses

From novice to tech pro — start learning today.