Progressbar updation problem



HI,

I am getting problem with splash screen showing while some other
process is going on. I have a timer which is not getting fired at the
interval set, when the long process is running on.

My code looks something like this,

btn_Click(object sender, System.EventArgs e)
{
timer1.Interval=100;
timer1.enabled=true;
panel1.visible=true;
// Some long running process
// While this process is going on i want to show progress bar updating
}

private void timer1_Tick(object sender, System.EventArgs e)
{
if (panel1.Visible == true)
{
if(progressBar1.Value==10)
{
progressBar1.Value=0;
}
progressBar1.Value = progressBar1.Value + 1;
}
}

So, while the long running process is going on, after every 100
milliseconds, the timer1_Tick should fire, and update the progressbar,
but the event is not getting fired at all. What am i doing wrong? How
can i solve the problem?

Thanks in Advance.

.



Relevant Pages

  • Re: Progressbar updation problem
    ... I have a timer which is not getting fired at the ... > // While this process is going on i want to show progress bar updating ... > private void timer1_Tick(object sender, ... > So, while the long running process is going on, after every 100 ...
    (microsoft.public.dotnet.framework.compactframework)
  • Causing a page refresh mid-method?
    ... private void Page_Load(object sender, System.EventArgs e) ... there any elegant way around this? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Progressbar updation problem
    ... I suspect that your long running process is located in the UI thread, ... Due to the fact that Forms.Timer also works in the UI thread (it sends WM_TIMER message to the message queue) you are just blocking it with your long operations. ... // While this process is going on i want to show progress bar updating} ...
    (microsoft.public.dotnet.framework.compactframework)