Hello everyone. I was wondering how i can have a saved log (for bookmarks for a web browser) in the form of a txt file be added to a combo box. Aka, i have a txt file that stores the saved bookmarks, and i want them to be uploaded to a combo box when the form loads. Here is the code so far;
CType(tabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("Google.com")
Dim sFileName As String = "C:\Stealth Browser\bookmarks.txt"
Dim myFileStream As New System.IO.FileStream(sFileName, _
FileMode.OpenOrCreate, FileAccess.Read, FileShare.Read)
Dim myReader As New System.IO.StreamReader(myFileStream)
Dim sFileContents As String = myReader.ReadToEnd()
ComboBox1.Text = sFileContents
myReader.Close()
myFileStream.Close()
What this does wrong, is it only uploads the last line of the txt file. How do i add every line as a separate item in the collections of the combo box? Thanks in advanced.