Shows the text property of a listbox in the tooltip property, when the mouse hovers over the listbo
Shows the text property of a listbox in the tooltip property, when the mouse hovers over the listbox for a second. Relies on the SendMessage
API Declarations
'[email protected]
'http://www.akaaz.cjb.net
Rate Shows the text property of a listbox in the tooltip property, when the mouse hovers over the listbo
(1(1 Vote))
Single, Y As Single, ListBox As ListBox) As String
Dim lXPoint As Long
Dim lYPoint As Long
Dim lIndex As Long
'
If Button = 0 Then ' No button was pressed
lXPoint = CLng(X / Screen.TwipsPerPixelX)
lYPoint = CLng(Y / Screen.TwipsPerPixelY)
With ListBox
lIndex = SendMessage(.hWnd, LB_ITEMFROMPOINT, 0, ByVal ((lYPoint * 65536) + lXPoint))
If (lIndex >= 0) And (lIndex <= .ListCount) Then .ToolTipText=".List(lIndex)" 'Return the text=".list(lIndex)" Else .ToolTipText 'Return nothing
End If
End With
End If
End Function
Shows the text property of a listbox in the tooltip property, when the mouse hovers over the listbo Comments
No comments yet — be the first to post one!
Post a Comment