I am making an application where after the login window, if you are a new user, you will run a tutorial to show the use of it. The problem is that a method of the second form is executed where the messagebox is displayed before the logeo form is closed, now I have it with this code;
private void abrirInicioJuego()
{
fb.timerRecursos();
FormInicial pi = new FormInicial(fb,tutorial);
pi.Show();
this.Close();
}
This code is executed in the login form by opening the initial form of the application.
private void PaginaInicioJuego_Load(object sender, EventArgs e)
{
FormTimers ft = new FormTimers();
ft.recupearUltimaConexion(id_partida);
ft.calcularDiferenciaDeTiempos(id_partida);
//Comienza a ejecutarse el tutorial
if (tutorial && this.Visible)
{
EmpezarTuto();
}
}
In the load of the initial form I execute a method (StartTuto ();) But all the messages that this method contains appear before the form is even displayed, before closing the form of logeo.