vb中,我的listbox里面有路径名,怎么去除
Mrpre 博客专家认证 2012-06-30 09:13:01 With Openfile
.Filter = "视频文件(*.dat;*.avi;*.mp3;*.asf;*.mpg)|*.dat;*.avi;*.mp3;*.asf;*.mpg|音频文件(*.mp3;*.wav;*.wma;*.mid)|*.mp3;*.wav;*.wma;mid|所有文件(*.*)|*.*"
.Multiselect = True
If .ShowDialog() = DialogResult.Cancel Then Exit Sub
'if openfile.re
End With
ListBox1.Items.AddRange(Openfile.FileNames)
我还有mediaplayer,这样,双击listbox里的项目,播放虽然简单了,但是播放列表里面的就不好看了,而且路径太长,存不下
。
我现在想的是:
1:取出listbox里面的项目,放到String A,用于播放,当双击第一个项目时,就把A赋值给URL。
2:去除A中的路径名,存于String B,然后再放到 listbox中
我不知道2中的代码该如何写。