Private Sub Form_Load()
List1.AddItem "aaaaa"
List1.AddItem "bbbb"
List1.AddItem "ccccc"
List1.AddItem "dddddd"
List1.AddItem "eeeee"
End Sub
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If List1.ListCount <> 0 Then List1.Drag vbBeginDrag
End Sub
Private Sub List2_DragDrop(Source As Control, X As Single, Y As Single)
List2.AddItem List1
End Sub
結果是對的(把一行字由list1拖到list2)
,但是怎樣令移動的物件是一行字而不是整個list1

vbqa 發表在 痞客邦 留言(0) 人氣()