有一个简单的方法:
Option Explicit
Dim a As Integer
Dim b As Integer
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then a = List1.ListIndex
End SubPrivate Sub List1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim temp As String
If Button = 1 Then
b = List1.ListIndex
If a <> b Then
temp = List1.List(a)
List1.List(a) = List1.List(b)
List1.List(b) = temp
End If
End If
End Sub你是想要WINAMP那种效果的话,要在MOUSEDOWN里做点文章
Option Explicit
Dim a As Integer
Dim b As Integer
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then a = List1.ListIndex
End SubPrivate Sub List1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim temp As String
If Button = 1 Then
b = List1.ListIndex
If a <> b Then
temp = List1.List(a)
List1.List(a) = List1.List(b)
List1.List(b) = temp
End If
End If
End Sub你是想要WINAMP那种效果的话,要在MOUSEDOWN里做点文章
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货