Hi, this is probably not that hard to do. But I've got two text files. The first has got a list of certain keywords. Each one if these keywords are fed into a combobox.
Now, when I choose one of the items from this combobox, I want to search the other textfile for the same keyword and read from that point to the next keyword. And then feed each line into a listbox. Hope I make myself understood.
Perhaps I should use an INI-file for this purpose, doesn't really matter for me.
The textfiles have this structure; Textfile1:
London
Oslo
New York
Hamburg
Amsterdam
The second textfile has this structure; Textfile2:
'London'
Apples
Oranges
Pears
'Oslo'
Pasta
Salami
Monkeyballs
'New York'
Dada
Duda
Dadadish
Etc etc.
Is this possible? The reason I want to do it this way is to create a fully dynamic system. One which relies fully on whatever information is stored in these textfiles. I'm gonna build pretty complex strings from these results later on.
So far, I've got this to read the first file and add each line to the combobox:
Dim oReadMenuFunction as System.IO.StreamReader
oReadMenuFunction = IO.File.OpenText("textfile1.txt")
Do While oReadMenuFunction.Peek <> -1
Dim LineIn as String = oReadMenuFunction.ReadLine()
Combobox.Items.Add(LineIn)
Loop