I am trying to make a button to remove an item from a listbox as well as my settings. Here is my code:
When I press remove it gets deleted. But when I restart the application it is there again
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items.Remove(ListBox1.SelectedItem)
My.Settings.passwords.Remove(ListBox1.SelectedItem)
My.Settings.Save()
When I press remove it gets deleted. But when I restart the application it is there again