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

listbox or array with two columns

$
0
0
i have a list box that i add file names into. the user clicks a browse button to open the file dialog and selects their files and adds them to the list box.

Code:

        Me.OpenFileDialogBrowseFiles.InitialDirectory = My.Settings.DownloadsLocation
        Me.OpenFileDialogBrowseFiles.FileName = Nothing
        Dim list As New List(Of String)
        If OpenFileDialogBrowseFiles.ShowDialog = Windows.Forms.DialogResult.OK Then
            For Each filePath As String In OpenFileDialogBrowseFiles.FileNames
                Me.ListBoxFileNames.Items.Add(System.IO.Path.GetFileName(filePath))
            Next
        End If

i want to show the file name in the listbox to the user but i also want to save the full file path.

Viewing all articles
Browse latest Browse all 27509

Trending Articles



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