Basically its a static login form. I have created a progress bar (progressBar1) and I enter text in 2 text boxes(one for id & one for password). ID and password are hard coded i.e id="admin" and password="admin". The thing I want is that when I press a button (button1), progress bar should start for 5 sec for both cases that are: if entered ID and password are correct then it should show another form when progress bar reaches to maximum and else messageBOX should say that entered info is not correct after progress bar reaches to maximum length
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "admin" && textBox2.Text == "admin")
{
form2 f2 = new form();
this.Hide();
f2.Show();
}
}
Now please help me how can i do that code as I have wasted 10 hours on trying.
Timer. Period. - Nikhil Vartak