Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Can a ComboBox list all txt file in a folder?

$
0
0

I'm using VS10 and what I like to do is put about 10 to 15 txt notes in a folder. Then with a combobox or a list box  it will show all txt files  in the folder and the text you select will show in the text box of the form.

Right now all I got is a button to open a text from a folder and to show it text box by using this:

Dim FILE_NAMEAsString = "C:\test.txt"

       Dim objReader AsNew System.IO.StreamReader(FILE_NAME)

        TextBox1.Text = objReader.ReadToEnd

        objReader.Close()

The reason I would like to change to a combobox or even a list box is it would be easier for me to make changes to the txt file or add to or delete file.

Is this something that can be done?

Thanks


Viewing all articles
Browse latest Browse all 3509

Trending Articles



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