Sure thing. Put this on Listbox MouseMove event:
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_GETITEMHEIGHT = &H1A1
Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim intItemIndex As Integer
Dim strItem As String
Dim lngItemHeight As Long
'Get the height og the item in the list
lngItemHeight = SendMessage(List1.hwnd, LB_GETITEMHEIGHT, 0, 0)
'Get the index of the item your mouse is over
intItemIndex = List1.TopIndex + (Y \ (lngItemHeight * Screen.TwipsPerPixelY))
If intItemIndex > List1.ListCount - 1 Then Exit Sub
strItem = List1.List(intItemIndex)
List1.ToolTipText = strItem
End Sub
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 12-02-1999).]