Click here to Skip to main content
16,022,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a progress Bar and set false from their property window and in program dynamically on text change event set progressBar1.Visible = true and againg after thread sleep of 300 again set to false but not working fine


my code

C#
private void textBox1_TextChanged(object sender, EventArgs e)//text change event 
{
    change();
}
void change()
{
progressBar1.Visible = true; // this property is not visibale at the UI .Progress Bar not visible at form
Thread.Sleep(3000);
progressBar1.Visible = false;

}
Posted
Comments
[no name] 11-Feb-15 4:40am    
You set the prograss bar to visible, then immediately call Sleep, which prevents the form from updating its display.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900