0

Well i got my codes so Checkbox and Textbox to read ini but i cant find how to make ListBox read ini like each line in the ini is 1 item on the listbox

i have the api calls thingy and other stuff, but if you have a code or something i could use ill be so happy

Thx in advance

2
Contributors
2
Replies
6
Views
7 Years
Discussion Span
Last Post by xfrolox
1

Try this:

Dim stream As System.IO.FileStream = New System.IO.FileStream(<string path to ini file>, System.IO.FileMode.Open)
Dim treader As System.IO.TextReader = New System.IO.StreamReader(stream)

Dim line As String

While treader.Peek > 0
    line = treader.ReadLine
    '' Add some checking to see if line should be added to the ListBox
    listbox1.Items.Add(line)
End While
treader.Close()
stream.Close()

Well i got my codes so Checkbox and Textbox to read ini but i cant find how to make ListBox read ini like each line in the ini is 1 item on the listbox

i have the api calls thingy and other stuff, but if you have a code or something i could use ill be so happy

Thx in advance

Votes + Comments
Rep for help ^^
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.