Article ID: 152259
Article Last Modified on 8/30/2004
Property Value -------- ----- Tag Opens a File ToolTipText Open
Property Value -------- ----- Tag Closes a File ToolTipText Close
Private Sub Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = "" ' Clear when not over ToolBar
End Sub
Private Sub Toolbar1_MouseMove(Button As Integer, _
Shift As Integer, x As Single, y As Single)
Dim Found As Boolean
Dim ToolBarButton As Variant
Dim Index As Long
'Loop through all buttons on the toolbar
For Index = 1 To Toolbar1.Buttons.Count
'Set reference to button
Set ToolBarButton = Toolbar1.Buttons(Index)
'Check if mouse is positioned over button
If (x > ToolBarButton.Left) And _
(x < (ToolBarButton.Left + ToolBarButton.Width)) And _
(y > ToolBarButton.Top) And _
(y < (ToolBarButton.Top + ToolBarButton.Height)) Then
'Mouse is over button. Now to avoid screen flickering,
'check if StatusBar needs updating
If StatusBar1.Panels(1).Text <> ToolBarButton.Tag Then
StatusBar1.Panels(1).Text = ToolBarButton.Tag
End If
'Set flag indicating a button was found
Found = True
'Button has been found, discontinue loop
Exit For
End If
Next
If Not Found Then
StatusBar1.Panels(1).Text = ""
End If
End Sub
Additional query words: kbDSupport kbDSD kbCtrl kbVBp500 kbVBp400 kbVBp600 kbVBp
Keywords: kbhowto KB152259