我试图在主窗体显示后立即打开辅助窗体,但是,辅助窗体首先显示,然后在辅助窗体关闭后显示主窗体(第二个窗体就像启动屏幕一样)。这是一个例子:
private void Form1_Load(object sender, EventArgs e)
{
doSomething1(sender, e);
doSomething2(sender, e);
// The new form I want to open after the main form.
Form2 f2 = new Form2();
doSomething3(sender, e);
}
private void doSomething1(object sender, EventArgs e)
{
// Do something here...
}
private void doSomething2(object sender, EventArgs e)
{
// Do something here...
}
private void doSomething3(object sender, EventArgs e)
{
// Do something here...
}