在vb中,Filebox1有一些文件,双击Filebox1的文件,Filebox1将这个文件的路径给a,这该怎么办

来源:百度知道 编辑:UC知道 时间:2024/05/28 11:02:22
在线等

加一个drivebox,filebox,dirbox
在drivebox change加入dir1.path=drive1.drive
在Dirbox1 change加入dir1.path=file1.path

file1.filename=a

Private Sub File1_DblClick()
a = File1.Path & "/" & File1.List(File1.ListIndex)
MsgBox a
End Sub

Private Sub File1_DblClick()
a = File1.Path
MsgBox a
'或者你要的是
a = Replace(File1.Path & "\", "\\", "\") & File1.FileName
MsgBox a
End Sub