Don't. Instead, have a MasterForm which is always opened from Application.Run. It's Visible property (and show in taskbar property) is set to false.
It looks in the application config file, and decides which form to show (lets say Form1)
It displays form1, and hooks the FormClosed Event to close itself.
When Form1 presses for form2, it signals a "Form2Please" event which the MasterForm handles. It closes Form1, displays Form2, and changes the application config file for next time.
Quote:
"Well, it seems ok, but how to write on App.Config file from code side, then ? it writes itself ?"
Yep, pretty much.
1) Open your projects Properties in the solution explorer, and double click on "Settings.settings"
2) In the resulting grid, change the Name to "MySetting", and set the Value to "Defaulted value". Leave Type and Scope as "string" and "User" respectively.
3) Save and close the settings window.
4) To read your setting:
string s = Properties.Settings.Default.MySetting;
5) To write your setting:
Properties.Settings.Default.MySetting = "My new setting value";
Properties.Settings.Default.Save();