Listbox HELP ?
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
mandai wrote:What are you asking for exactly? Something to copy listbox items from one listbox to another?okay the passwords are added to the list box on form2
i close form2
i close form1 (whitch is the adding form)
i open program again..
i go to form2
i see the passwords there saved

but how do i save theM>?
In the form2 closing event you can try this:
Code: Select all
Then on the form2 load event use this:
File.Delete("items.txt")
For i As Integer = 0 To ListBox1.Items.Count - 1
File.AppendAllText("items.txt", ListBox1.Items(i) & vbCrLf)
Next
Code: Select all
Dim lines As String() = File.ReadAllLines("items.txt")
For i As Integer = 0 To lines.Length - 1
ListBox1.Items.Add(lines(i))
Next
Copyright Information
Copyright © Codenstuff.com 2020 - 2023