I want to show progress bar during loading a Remote xml file. I am using Windows Application Form in Visual C# 2008 Express Edition.
private void button1_Cl
First it might be going too fast for you to see - try putting a Sleep in there if you're testing that, but further, the reason it's not updating is that you're processing and that happens on the same thread that the main UI is using.
You can have the program process all events by calling Application.DoEvents() but by doing so, you also reprocess anything the user might have clicked on (including this button) - so if you want to DoEvents and make sure you don't end up processing additional work, disable the form when the method starts.
All that said, a better model is to thread your work and update the progress bar on a timer or a callback.