Hello, I wonder if you can help me please.
I have a very simple program which simply populates a listbox with a list of files stored in a directory.
However, I'd like to embed these files into the application itself and open them from there rather than from looking at the directory.Code:Try lvScripts.View = View.Details lvScripts.Items.Clear() lvScripts.Columns.Clear() lvScripts.Columns.Add("Filename", 250, HorizontalAlignment.Left) Dim dFolder As DirectoryInfo = New DirectoryInfo(ScriptDirectory) Dim fFileArray() As FileInfo = dFolder.GetFiles Dim fFile As FileInfo Dim lCurrent As ListViewItem For Each fFile In fFileArray lCurrent = lvScripts.Items.Add(fFile.Name) Next Catch ex As Exception MessageBox.Show(ex.Message) End Try
To this end I've added each of the files as a resource but I don't know how to populate the list view with a list of the text files in the my.resources rather than a list of the text files in the directory.


Reply With Quote
