The fallowing example saves the properties (location, size and windows state) of a form to app.config
when the form is closed and restores the form state when it is loaded.
Create three properties called Size ,Location and WindowState in project settings dialog as shown in picture:

Modify Form.Load and FormClosing methods (Use DesktopBounds (instead Form.Location and Size)
to place form correctly on a multi screen desktop )
private void Form1_Load( object sender, EventArgs e )
{
// restore location and size of the form on the desktop
this.DesktopBounds =
new Rectangle(Properties.Settings.Default.Location,
Properties.Settings.Default.Size);
// restore form's window state
this.WindowState = ( FormWindowState )Enum.Parse(
typeof(FormWindowState),
Properties.Settings.Default.WindowState);
}
private void Form1_FormClosing( object sender, FormClosingEventArgs e )
{
Properties.Settings.Default.Location = this.DesktopBounds.Location;
Properties.Settings.Default.Size = this.DesktopBounds.Size;
Properties.Settings.Default.WindowState =
Enum.GetName(typeof(FormWindowState), this.WindowState);
// persist location ,size and window state of the form on the desktop
Properties.Settings.Default.Save();
}
Technorati : c#, dotnet, microsoft, winform