Currently I have an image fix of PictureBox and I want to go through it to apply an image to the images that are after this month, each image represents a month and I already made the cycle for
:
Cycle for
:
for (int MesE = Convert.ToInt16(Mes); Convert.ToInt16(Mes) <= pics.Length;MesE++)
{
pics[MesE].Image = Image.FromFile(@"..\..\Imagenes\NoAplica.png");
pics[MesE].Enabled = false;
}
Everything is fine except for the defect that when I do the debuegeo of my application and it reaches line pics[MesE].Image = Image.FromFile(@"..\..\Imagenes\NoAplica.png");
it cycles, but it does not cycle within the cycle for
but it Take the following method:
this.Hide();
Modal_General general = new Modal_General();
general.Closed += (s, args) => this.Close();
general.Show();
And from there it goes to another method that is where it makes an infinite loop and if I give it F5 the loop is finished but it does not make me the loop action for
that is up.
Code where the loop is made:
private void horaActual(object sender, EventArgs e)
{
String tiempo = DateTime.Now.ToString("HH:mm:ss");
lblTiempo.Text = "Hora Actual: " + tiempo;
}
I know it's all weird, I do not know why this is, maybe I did something wrong.