//My notes after reading around this namespace setttingsettings { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //Click "Load" after selecting "Events" in "Properties" in the solutions explorer private void Form1_Load_1(object sender, EventArgs e) { MessageBox.Show("load ", "load"); GetSettings(); } // Call this from "Form1_Load" public void GetSettings() { lblName.Text = Properties.Settings.Default.Name; lblTel.Text = Properties.Settings.Default.Tel.ToString(); MessageBox.Show("Get ", "get"); } //Highlight the Save button from the designer and then select the "Click" "Action" to make this function private void cmdSave_Click(object sender, EventArgs e) { SaveSettings(); } public void SaveSettings() { MessageBox.Show("SAVE ", "SAVE"); Properties.Settings.Default.Name = txtName.Text; Properties.Settings.Default.Tel = Convert.ToInt32(txtTel.Text); Properties.Settings.Default.Save(); lblName.Text = Properties.Settings.Default.Name; lblTel.Text = Properties.Settings.Default.Tel.ToString(); }
I have been watchingyou for a long time.Sir is there any way to save image in settings pannel. Like text feed . without creating a database Plzzz help me i am stuck.
//My notes after reading around this
namespace setttingsettings
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//Click "Load" after selecting "Events" in "Properties" in the solutions explorer
private void Form1_Load_1(object sender, EventArgs e)
{
MessageBox.Show("load ", "load");
GetSettings();
}
// Call this from "Form1_Load"
public void GetSettings()
{
lblName.Text = Properties.Settings.Default.Name;
lblTel.Text = Properties.Settings.Default.Tel.ToString();
MessageBox.Show("Get ", "get");
}
//Highlight the Save button from the designer and then select the "Click" "Action" to make this function
private void cmdSave_Click(object sender, EventArgs e)
{
SaveSettings();
}
public void SaveSettings()
{
MessageBox.Show("SAVE ", "SAVE");
Properties.Settings.Default.Name = txtName.Text;
Properties.Settings.Default.Tel = Convert.ToInt32(txtTel.Text);
Properties.Settings.Default.Save();
lblName.Text = Properties.Settings.Default.Name;
lblTel.Text = Properties.Settings.Default.Tel.ToString();
}
helpful but 1 problem
if you shut down the PC, or restart it, it wont save.
You should save before shut down your pc
ok thanks!
How to save user settings
how to add setting in Runtime .? like Settings.default.add("New Setting").?
good job .... but how to save settings into App.Config . can you do this
Hi, You can view this video th-cam.com/video/-KdqdWTNO7Q/w-d-xo.html to know how to save settings to the app.config file. thank you
I have been watchingyou for a long time.Sir is there any way to save image in settings pannel. Like text feed . without creating a database
Plzzz help me i am stuck.
it makes me an error on the way in
My question too
Hi How to save ListBox and ComboBox items
Hi, You can save data as a string for example [item1, item2, item3], then use split method to convert to array. Thanks
can you make a tutorial on that please??
Thankz
Thank you !
Thanks for foxlearn