Hi, I want to know how to save elements properties even after the form closes, and resume it back when I open the form.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void apply_Click(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
MessageBox.Show("Checkbox1 is checked");
}
else if (checkBox2.Checked == true)
{
MessageBox.Show("Checkbox2 is checked");
}
else
{
MessageBox.Show("Checkbox3 is checked");
}
}
private void load_Click(object sender, EventArgs e)
{
}
private void save_Click(object sender, EventArgs e)
{
}
}
}
Suppose I check the checkbox2 and click apply button, it should save and close.
When I open back the form then the checkbox2 should be checked.
And also if I have checked checkbox3 and click save button it should save the settings and by clicking on load button it should load back(i.e checkbox3 should be checked)
p.s how to save the setting data?