The progress bar execution will become too slow?

Posted by Sudheep.grandhe under C# on 11/7/2011 | Points: 10 | Views : 3468 | Status : [Member] | Replies : 2
Hi,

The progress bar execution will become too slow? how can i increase the fast execution.when i enter the details.here is the code.please check it.

private void timer1_Tick(object sender, EventArgs e)
{


progressBar1.Visible = true;
progressBar1.Value = progressBar1.Value + 5;
label3.Visible = true;
label3.Text = "please wait while we are checking authentication...";
if (progressBar1.Value == progressBar1.Maximum)
{
if ((txt_username.Text == "marsweb") && (txt_password.Text == "marsweb"))
{
timer1.Enabled = false;
progressBar1.Visible = false;
label3.Text = "welcome !! your are authorized user";
progressBar1.Enabled = false;
progressBar1.Value = 0;
}
else
{
progressBar1.Enabled = false;
timer1.Enabled = false;
progressBar1.Visible = false;
progressBar1.Value = 0;
label3.Text = "sorry !! Username or Password is wrong...";
}
}

Best,
Sudheep.



Responses

Posted by: Naraayanan on: 1/23/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Try this way,

progressBar1.Value += progressBar1.Value + 5; 



Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 1/24/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

What is your maximum value. change the value "5" based on the maximum that will increase the speed

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response