VB.NET2010中关于读取FilelistBox中显示文件的

2024-12-27 02:30:42
推荐回答(1个)
回答1:

Private Sub File1_Click()
Dim fileStr As String
Dim dataStr As String

fileStr = File1.List(File1.ListIndex)

Open App.Path + "\" + fileStr For Input As #1
Input #1, dataStr
Close (1)

Print dataStr
End Sub