views:

290

answers:

1

Hi all,

I want to have my own progress bar in .net compact framework, instead of default wait cursor. I have tried with a form, having only a progress bar, and showing and hiding the form when I want to show some background activity running, but that does not update the progress bar. I have found out that it needs to be on different thread. I am quite weak at threads, I cant get it working.

Please help me out. Thanks in advance.

A: 

A cheap way of doing this would be to use Application.DoEvents(); within your "background work"... This would allow the screen to update whilst your application is busy.

I do not recommend doing this though.

I suggest you learn how to start and use BackgroundWorkers. They should provide the functionality you are looking for. Note you will not be able to alter the progress bar directly from the new thread, so will have to use an event or delegate.

Chris
Thanks Chris for your answer, but I guess .net compact framework 2.0 does not support BackgroundWorkers :(
Just use a normal thread then
Chris