How to Create Modern Splash Screen with Progress Bar & timer using C# | Visual Studio Tutorials

preview_player
Показать описание
How to Create Modern Splash Screen with Progress Bar & timer using C# | Visual Studio Tutorials Let's Know ...

You can also check on my site :

Code for Modern Splash Screen with Progress Bar & timer using C#,Csharp vscode

public Form1()
{
InitializeComponent();
timer1.Enabled = true; // here we have enable timer (start timer)
}

2. Now initialize the integer with variable

int time = 0;

3. Now on the timer Event just paste the code below in this code timer1 is my timer tool name

private void timer1_Tick(object sender, EventArgs e)
{

time++;
progressBar1.Value = time; // progress bar value is equals to timer
if(time == 100) // when time is 100 then below
{
timer1.Enabled = false; // timer false
var fm2 = new Form2(); // we create object of form 2 here
fm2.Show(); //we show form 2
this.Hide(); //here we hide this form 1
time = 0;

// Now if you want to faster load then
}
}
Рекомендации по теме