Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

help me please with my final touch !!

$
0
0
I have a music player
i have two ways to add files
first way is to press add files button and it's ok
second way is to drag files (audio files) and drop them into my playlist (listbox1)
the problem is that when i drag them and drop them into listbox1 they are moved with the full path not only the name
eg. (D/songs/Toni Braxton - Un-Break My Heart) i want to make them like this (Toni Braxton - Un-Break My Heart) just name not full path ..
i use this code in listbox1 in dragdrop event
Code:

Dim Files As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
        For Each FileName As String In Files
            ListBox1.Items.Add(FileName)
        Next

and in listbox1 in dragenter event i used the following code
Code:

  If e.Data.GetDataPresent(DataFormats.FileDrop) Then
            e.Effect = DragDropEffects.Copy
        End If

help is appreciated .. thank u :)

Viewing all articles
Browse latest Browse all 27355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>