设置ListBox的OLEDragDrop属性为1-Manual,然后在ListBox的OLEDragDrop事件中写代码,遍历Data对象的Files集合取得所有的文件名。
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim i As Integer
    For i = 1 To Data.Files.Count
        List1.AddItem Data.Files(i)
    Next i
End Sub

解决方案 »

  1.   

    那还不简单?再加一个判断贝:
    If fso.FolderExsits(Data.Files.Count) Then
        '是一个目录!不添加
    Else
        List1.AddItem Data.Files(i) 
    End If我只是随便写了一个例子,其他方法还有很多。
      

  2.   

    想不出什么好办法,只有通过文件名用api判断了
    Public Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal lpszPath As String) As Long
    Public Declare Function PathIsDirectory Lib "shlwapi.dll" Alias "PathIsDirectoryA" (ByVal lpszPath As String) As LongIf PathFileExists(<文件名>) <> 0 And PathIsDirectory(<文件名>) = 0 Then 文件存在。