Me again (sorry to be a pain)... I've asked for solutions on this before be each time with a slight twist)... I've gone through my history but cannot get it working!
I have a winform with:
All i want to do is select an item in Combobox... for this i use CASE SELECT... if (for example) I choose APPLES
I streamreads APPLES.txt into Combobox2 and splits the text between Combobox2 and Textbox1
e.g. APPLES.txt = "golden delicious, green"
Hope this helps - my head is wrecked & I need a quick solution.
As you can see, I tried "Me.TextBox1.Text = line" and this displays "golden delicious, green" in Combobox2 & Textbox1
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim oRead As System.IO.StreamReader
oRead = System.IO.File.OpenText("C:\apples.txt")
While (oRead.Peek <> -1)
Dim line As String = oRead.ReadLine
Dim values As String() = line.Split(","c)
Me.ComboBox2.Text = line
Me.TextBox1.Text = line