所以基本上我試圖創建一個文件管理器,而我在失敗。當我從zip/rar文件加載文件名時,我試圖找出並沒有找到答案,爲什麼我得到(Collection)。Visual Studio 2012 - 上市的收集輸出?
的代碼如下
Imports System.IO
Public Class Form1
Private Sub modFolderButton_Click(sender As Object, e As EventArgs) Handles modFolderButton.Click
Dim modFolder
modFolder = modFolderText.Text
If IO.Directory.Exists(modFolder) Then
MsgBox("Location Successfully Set; " + modFolder, MsgBoxStyle.Information)
Else
MsgBox("Error; Invalid Location Set")
Exit Sub
End If
End Sub
Private Sub starboundButton_Click(sender As Object, e As EventArgs) Handles starboundButton.Click
Dim starboundFolder
starboundFolder = starboundFolderText.Text
If IO.Directory.Exists(starboundfolder) Then
MsgBox("Location Successfully Set; " + starboundFolder, MsgBoxStyle.Information)
Else
MsgBox("Error; Invalid Location Set")
Exit Sub
End If
End Sub
Private Sub listRefreshButton_Click(sender As Object, e As EventArgs) Handles listrRefreshButton.Click
Dim modFolder
Dim listModsDetected
modsDetectedList.Items.Clear()
modFolder = "C:\"
listModsDetected = My.Computer.FileSystem.GetFiles(modFolder, FileIO.SearchOption.SearchTopLevelOnly, "*.zip")
modsDetectedList.Items.Add("None Detected!")
For Each fileName As String In listModsDetected
modsDetectedList.Items.Remove("None Detected!")
modsDetectedList.Items.Add(listModsDetected)
Next
End Sub
End Class
請在問題本身中包含您的代碼。 – SLaks