*Form Closing
-This code sets the settings when the form is closing
Or you can add it as a button event
However you want.
Saving Multiple Items
Create the same setting as above (combobs) Except it's type will be Specialized.StringCollection [system.Collections.Specialized.StringCollection]
* For Load
-Loads Settings
[php]
If My.Settings.combobs IsNot Nothing Then
For Each Item As String In My.Settings.combobs
ComboBox1.Items.Add(Item)
Next
Else
My.Settings.combobs = New System.Collections.Specialized.StringCollection
End If
[/php]
Save Settings, Button or Form Closing
[php]
If ComboBox1.Items.Count > 0 Then
My.Settings.combobs.Clear()
For Each Item2 As String In ComboBox1.Items
My.Settings.combobs.Add(Item2)
Next
My.Settings.Save()
End If
[/php]
Thanx Man, Best Vb Minion
Not a problem, there is a problem though, I am correcting it in the code
hehe after debugging theres an error... Lol
For Each item As String In My.Settings.Combobs
Fixed, Should work fine.
Have Fun
Works Perfectly, Thanks
Marked Solved, Left open for other users.
Avoid posting unless under 7 days & Necessary