开发者

Custom progress bar in .NET CF

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 开发者_StackOverflow中文版out. Thanks in advance.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜