3
I am working with a software in C#, in which after a login screen, appears a splashscreen
with a progressbar
that when it reaches its maximum value (100)
, she calls the main form of the program.
The problem is that the progressbar
reaches the value of 100
, but visually in splashscreen
, It is not completely filled (which it should because it has reached its stipulated maximum value) and then ends up calling the next form in being fully loaded. I’m gonna drop the code splash
, thank you!
Note: The commented sites are of another thing that was testing so they are not relevant in the case.
private void EfectTime()
{
//SplashTimer.Interval = 100;
SplashTimer.Tick += new EventHandler(SplashTimer_Tick);
SplashTimer.Enabled = true;
//this.Opacity = 1;
}
// private bool Efect = true;
private void SplashTimer_Tick(object sender, EventArgs e)
{
pgrBar.Increment(1);
//if (Efect)
//{
// this.Opacity -= 0.01D;
//}
if (pgrBar.Value == 100)
{
//Efect = false;
SplashTimer.Enabled = false;
FrmTelaPrincipal frmTelaprincipal = new FrmTelaPrincipal();
frmTelaprincipal.Show();
this.Hide();
}
}
How far does it go? This is not due to the fact that the main screen opens as soon as progress reaches 100?
– Jéf Bueno
yes really, it doesn’t complete because the next form opens. But isn’t its upload synchronized with its value? I think it would be supposed that when it reached 100 it would be fully filled and immediately call the form.
– Gabriel Arruda
Maybe she is, she just doesn’t have time to see =)
– Jéf Bueno