I Added ClientSize to Application Settings and DataBindings in Properties window, in order to save size of the form after it was closed. And that worked. But when I minimize form and then activate it back, it has minimum size . Is it a bug or I'm doing something wrong
I found answer in this topic. So to save size and location without side effects , need to remove binding and save application settings by hand
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Size = this.Size;
Properties.Settings.Default.Location = this.Location;
Properties.Settings.Default.Save();
}
private void Form1_Load(object sender, EventArgs e)
{
this.Size = Properties.Settings.Default.Size;
this.Location = Properties.Settings.Default.Location;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With