I want to have one windows form with one progress bar on it to appear with the progress bar getting filled upto maximum to give some visual loading application type of effect. I have written some code to do this task, and it worked fine in one of my previous application but in my current application when I am using the same code which I did in the previous application the progress bar just gets filled upto 10% and then stops. Can anyone provide the solution. The code is as below:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace Cyber_Application
{
public partial class SerialCheck : Form
{
public SerialCheck()
{
InitializeComponent();
}
Login login = new Login();
private void SerialCheck_Load(object sender, EventArgs e)
{
timer1.Start();
timer1.Interval += 1;
progressBar1.Value += 10;
if (progressBar1.Value == 100)
timer1.Stop();
if (progressBar1.Value == 100)
{
progressBar1.Hide();
this.Hide();
}
if (progressBar1.Value == 100)
login.Show();
}
}
}