Well i downloaded a program for wheater but it is not mind now, i watched, than you write a city and you close the program, and when you open it again, it has de last city you write, how is it? i watched it has this code in whaterform_formClosed
but how do i create these variables? and if this is posible can I to do a program without a database? saveing all in a dataset? or datatables? default databales? default dataset?
but now i want to know how to create a Default variable
private void weatherForm_FormClosed(object sender, FormClosedEventArgs e)
{
//Save Settings
Settings.Default.defaultCity = txtCity.Text;
Settings.Default.intervalText = comboBoxEdit1.Text;
Settings.Default.windowPosition = this.Location;
Settings.Default.timerOn = timer1.Enabled;
Settings.Default.intervalTime = delay;
Settings.Default.Save();
}
You can use ‘settings’ to do this:
See Using Application Settings and User Settings for more information.