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

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

commented: Rep for help ^^ +1

Soz for the delay, but it works thx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.