Please see my comment to Solution 1.
So, there is another technique which you could allow you to work with two different main form one by one. Let's say, you have two form classes; first one is your single-use form you wanted to hide after use forever, call if
IntroductionForm
, and another one is your "permanent" main form; call it
MainForm
.
using System.Windows.Forms;
static void Main() {
Application.Run(new IntruductionForm());
Application.Run(new MainForm());
}
It is important to understand that a form instance becomes a main form when it is used as an argument of
Application.Run
; unlike other forms, when a main form is closed, the method
Application.Run
returns.
This explains how it works.
—SA