如何在其它事件中(如click事件)中调用List1_OLEDragDrop事件啊,当中的参数怎么设置!
Private Sub jfList_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
...
End Sub
主要是Data As DataObject这个参数在其它事件中怎么声明!
...全文
2297打赏收藏
OLEDragDrop事件问题!
如何在其它事件中(如click事件)中调用List1_OLEDragDrop事件啊,当中的参数怎么设置! Private Sub jfList_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) ... End Sub 主要是Data As DataObject这个参数在其它事件中怎么声明!
Private Sub Form_Load()
List1.OLEDropMode = 1
ListView1.OLEDragMode = 1
Dim i As Integer
ListView1.Icons = ImageList1
For i = 1 To 12
ListView1.ListItems.Add i, "Mov" & i, "List" & i, 1
Next
End Sub
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
List1.AddItem ListView1.SelectedItem.Key
End Sub