list1 list2 ...
他们的
OLEDragMode=1
OLEDropMode=1Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
List1.AddItem Data.GetData(vbCFText)
End Sub
Private Sub List2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
List2.AddItem Data.GetData(vbCFText)
End SubTry it

解决方案 »

  1.   

    以前 呆鱼 发给我的一个例子。他那种方法,有点绝:dragdrop.frm
    ================================================================================
    VERSION 5.00
    Begin VB.Form Form1 
       Caption         =   " Way to Drag Drop Listbox"
       ClientHeight    =   3015
       ClientLeft      =   60
       ClientTop       =   345
       ClientWidth     =   3735
       LinkTopic       =   "Form1"
       ScaleHeight     =   3015
       ScaleWidth      =   3735
       StartUpPosition =   3  'Windows Default
       Begin VB.ListBox List1 
          Height          =   2010
          Left            =   240
          TabIndex        =   6
          Top             =   360
          Width           =   1455
       End
       Begin VB.PictureBox Picture1 
          BorderStyle     =   0  'None
          Height          =   2055
          Left            =   240
          ScaleHeight     =   2055
          ScaleWidth      =   1455
          TabIndex        =   5
          Top             =   360
          Width           =   1455
       End
       Begin VB.CommandButton Command2 
          Caption         =   "Exit"
          Height          =   255
          Left            =   2760
          TabIndex        =   4
          Top             =   2640
          Width           =   855
       End
       Begin VB.CommandButton Command1 
          Caption         =   "Clear List"
          Height          =   255
          Left            =   1920
          TabIndex        =   3
          Top             =   2640
          Width           =   855
       End
       Begin VB.ListBox List2 
          Height          =   2010
          Left            =   2040
          TabIndex        =   2
          Top             =   360
          Width           =   1455
       End
       Begin VB.Frame Frame2 
          Caption         =   "Favorites"
          Height          =   2415
          Left            =   1920
          TabIndex        =   1
          Top             =   120
          Width           =   1695
       End
       Begin VB.Frame Frame1 
          Caption         =   "Playlist"
          Height          =   2415
          Left            =   120
          TabIndex        =   0
          Top             =   120
          Width           =   1695
       End
    End
    Attribute VB_Name = "Form1"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
    Dim thesong As String
    Dim takesong As StringPrivate Sub Command1_Click()
    List2.Clear
    End SubPrivate Sub Command2_Click()
    Unload Me
    End
    End SubPrivate Sub Form_Load()
    List1.AddItem "Song1"
    List1.AddItem "Song2"
    List1.AddItem "Song3"
    List1.AddItem "Song4"
    List1.AddItem "Song5"
    End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then Exit Sub
    MousePointer = 0
    takesong$ = ""
    End SubPrivate Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then Exit Sub
    takesong$ = ""
     MousePointer = 0End SubPrivate Sub Frame2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then Exit Sub
    takesong$ = ""
    MousePointer = 0End SubPrivate Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If List1 = "" Then Exit Sub
    If Button = 1 Then
    thesong$ = List1.ListIndex
    takesong$ = List1.List(thesong$)
    MousePointer = 2
    End If
    End SubPrivate Sub List2_DblClick()
    If List2 = "" Then Exit Sub
    Dim a As String
    a$ = List2.ListIndex
    List2.RemoveItem a$
    End SubPrivate Sub List2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If takesong$ = "" Then Exit Sub
    List2.AddItem takesong$
    takesong$ = ""
    If Button = 0 Then MousePointer = 0
    End Sub
      

  2.   

    可是,请问,如何删除原来的listbox中的item呢?
    我是由多个listbox之间移动,移动后必须删除原来的,尝试了很多方法,不行
      

  3.   

    Private Sub List1_DblClick()
        List1.RemoveItem List1.ListIndex
    End Sub