I'm using My.Settings to store different text for each item in combobox
It looks like this
I added to project settings 5 settings with type "String"
I'm using this code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If cmbperiod.SelectedItem = 1 Then
txtnote.Text = My.Settings.first()
ElseIf cmbperiod.SelectedItem = 2 Then
txtnote.Text = My.Settings.second()
ElseIf cmbperiod.SelectedItem = 3 Then
txtnote.Text = My.Settings.third()
ElseIf cmbperiod.SelectedItem = 4 Then
txtnote.Text = My.Settings.fourth()
ElseIf cmbperiod.SelectedItem = 5 Then
txtnote.Text = My.Settings.fifth()
End If
End Sub
I can load value from my.settings but how can i edit it.
Example i want to type the note for third period and on Form_Closing to save that text to my settings.third so next time i open form it will be loaded.
Anel