I am using visual studio 2008 and using the progress bar component.

I am using the progress bar to show that while query is running. But the problem is that while the form of progress bar is shown it is static during the execution.
First before calling to my query function I am calling frmmain.show (form containing the progress bar)

Then I called my query and in query loop am using the update function (frmmain.update) to keep the progress bar updated. the probelm is that while showing the bar it remains static.

Can any one help. Is there any way of doing it in vs 2008?