鼠标经过list1.list(x)就将list1.list(x)选中
如何实现呢?
鼠标经过list1.list(x)就将list1.list(x)选中
如何实现呢?
Const ListLineHeight = 180
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 20
List1.AddItem i
Next i
End Sub
Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim myIndex As Integer
myIndex = Y \ ListLineHeight
If myIndex < List1.ListCount Then List1.ListIndex = myIndex
End Sub
窗体上放一个List控件,运行一下,看能满足你的要求不