I m having a windows form class frmProcessSalary and inside setProgress method is implemented.
public partial class frmProcessSalary : Form
{
public void setProgress()
{
int i;
progressBar1.Minimum = 0;
progressBar1.Maximum = 200;
for (i = 0; i <= 200; i++)
{
progressBar1.Value = i;
}
}
}
From another class outside I create a reference to this and call this method.
frmProcessSalary newProcessSalary = new frmProcessSalary();
newFrmProcessSalary.setProgress();
In this outside class I have hundreds of queries being executed while calling this frmProcessSalary
method. But the progress bar does not proceed.
I tried with Application.DoEvents()
also but no success.
Any idea please?