Really need 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.
I need help using settings:
Save whats selected in listbox
and
save whats written in a textbox
when form closes or when someone clicks a button
Save whats selected in listbox
and
save whats written in a textbox
when form closes or when someone clicks a button
my.settings.SETTINGNAME = textbox1.text
my.settings.save
or
my.settings.SETTINGNAME = listbox1.text
my.settings.save
and for the closeing of the form -
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
End Sub
my.settings.save
or
my.settings.SETTINGNAME = listbox1.text
my.settings.save
and for the closeing of the form -
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
End Sub
my.settings.SETTINGNAME = listbox1.SelectedText
or
my.settings.SETTINGNAME = listbox1.SelectedItem.ToString
my.settings.save()
or
my.settings.SETTINGNAME = listbox1.SelectedItem.ToString
my.settings.save()
you have to connect the ListBox with the Setting
Form_Load Event
ListBox1.Selected= my.settings.SETTINGNAME
something like that
Form_Load Event
ListBox1.Selected= my.settings.SETTINGNAME
something like that
look post your script so that we can see what you are trying to do.
It will give us a better idea of what is going on.
It will give us a better idea of what is going on.
Its a listbox and i want it to save the selected item in the listbox when they click a button or close the form...
Code: Select all
?File.WriteAllText("selected.txt", ListBox1.SelectedItem.ToString())
File.WriteAllText("textbox.txt", TextBox1.Text)
Copyright Information
Copyright © Codenstuff.com 2020 - 2023