我有一个表单显示进度消息作为一个相当长的过程运行。 这是一个网络服务的呼叫,所以我无法真正显示进度条上的百分比完整数字。 (我不是特别喜欢进度条的Marquee属性)
我想展示一个动画GIF,让进程有一些活动的感觉(例如,从一台计算机到另一台计算机的文件,如Windows复制过程)。
你怎么做到这一点?
I have a form showing progress messages as a fairly long process runs. It's a call to a web service so I can't really show a percentage complete figure on a progress bar meaningfully. (I don't particularly like the Marquee property of the progress bar)
I would like to show an animated GIF to give the process the feel of some activity (e.g. files flying from one computer to another like Windows copy process).
How do you do this?
最满意答案
这不是太难了
将一个picturebox放在你的表单上。 在图片框中添加.gif文件作为图像 加载时显示图片框。需要考虑的事项:
禁用图片框将阻止gif动画化。动画GIF:
如果您正在寻找动画GIF,您可以在这里生成
另一种做法:
我发现工作得很好的另一种方法是在代码项目中找到的异步对话框控件
It's not too hard.
Drop a picturebox onto your form. Add the .gif file as the image in the picturebox Show the picturebox when you are loading.Things to take into consideration:
Disabling the picturebox will prevent the gif from being animated.Animated gifs:
If you are looking for animated gifs you can generate them here
Another way of doing it:
Another way that I have found that works quite well is the async dialog control that I found on the code project
更多推荐
发布评论