Listview.tag属性被Foxtable底层用作其它用途了,换个方式
Public Sub Listview_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim Lv As System.Windows.Forms.Listview = CType(sender, System.Windows.Forms.Listview)
Dim OldItem As System.Windows.Forms.ListViewItem = Nothing
If vars("a") IsNot Nothing AndAlso Typeof vars("a") Is System.Windows.Forms.ListViewItem Then OldItem = CType(vars("a"), System.Windows.Forms.ListViewItem)
Dim Item As System.Windows.Forms.ListViewItem = Lv.GetItemAt(e.X, e.Y)
If Item IsNot Nothing Then
If OldItem IsNot Nothing AndAlso Not OldItem.Equals(Item) Then OldItem.BackColor = lv.BackColor
Item.BackColor = Color.Red
vars("a") = Item
Else
If OldItem IsNot Nothing AndAlso Not OldItem.BackColor.Equals(Lv.BackColor) Then OldItem.BackColor = lv.BackColor
End If
End Sub