如何显示一个Windows窗体(C#)的GIF动画 [英] How do you show animated GIFs on a Windows Form (c#)

查看:301
本文介绍了如何显示一个Windows窗体(C#)的GIF动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示为一个相当长的过程中运行进度消息的形式。这是对Web服务的调用,所以我真的不能显示进度条上显示完成百分比数字有意义。 (我并不特别喜欢进度栏的字幕属性)

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)

我想显示动画GIF给过程中的一些活动的感觉(例如文件从一台计算机飞往另一个像Windows复制过程)。

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).

你怎么做到这一点?

推荐答案

这不是太硬了。


  1. 挂断一个PictureBox拖到窗体。

  2. 添加.gif文件的图像在PictureBox

  3. 显示在PictureBox当加载。

事情要考虑到:


  • 禁用该图片将prevent被动画GIF图片。

GIF动画:

如果您正在寻找GIF动画可以这里

If you are looking for animated gifs you can generate them here

做的另一种方式:

这工作得很好,我已经找到另一种方式是,我在 code项目

Another way that I have found that works quite well is the async dialog control that I found on the code project

这篇关于如何显示一个Windows窗体(C#)的GIF动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆