Hi there
i hope your all well. I m trying to have a label text change and equal to a text box value so that the next time I load I start from there. It's counting and when I stop it changes the label text to another value from wea I can start when the next day I load.
Loading

VulpesPosted Dec 6, 2013, 10:45 AM
You could either use a simple text file for this or you could use a 'user setting'.
For the former the code would be something like this:
string filePath = Application.StartupPath + "\\mysetting.txt";
// save value to file
System.IO.WriteAllText(filePath, label1.Text);
// read it back
if (System.IO.File.Exists(filePath))
{
label1.Text = System.IO.File.ReadAllText(filePath);
}
else
{
label1.Text = "0'; // or whatever
}
Check this link for the latter:
http://msdn.microsoft.com/en-us/library/bb397750(v=vs.110).aspx