如何播放GIF动画
编号:QA000813
建立日期: 1999年4月16日 最后修改日期:2003年11月1日
所属类别:
Q
xinyinmu:
VB 5.0
windows95
用VB 5.0编程,如何播放GIF动画?
A回答:
你可以在http://www.codeguru.com/atl/Gif89a.shtml中下载免费的GIF89控件,同时那里还有这个控件的VC++源程序。另一个办法是利用IE的WebBrowser控件显示GIF文件,但这个办法显然不够好,因为不同IE版本的程序不兼容,难道仅仅为了播放动画文件就强迫用户安装IE 4吗?
另外,你可以参考QA000747 "GIF文件的格式"。
zhongsq问:
操作系统: win95/98/NT
编程工具: VB
问题: 我已经读过你写的关于“如何播放GIF动画”,也到你所提供的网址去看了,并不提供GIF89.DLL的下载,见http://www.codeguru.com/mfc/comments/5478.shtml,上面只有以下内容:
If you are using VC++ project, the process is simple. Register the "Gif89.dll" on your machine. From the developer studio, form the "Components and Controls Gallery" Dailog box form "Project->Add to Project-> Components and Controls" go to "Registered ActiveX Controls" folders and add "Gif89 Class" to your project. The control appears in the dialog "controls" tool bar and is ready to be used as any other control.
这是不是说我到VISUAL STUDIO中找到这个控件注册就行了,可是据上面说的,add "Gif89 Class" to your project , 我能注册一个类到VB的项目中吗?请教这样到底可以吗 ? 还有什么办法吗 ?
回答:
我实在不能理解你为什么不能在上面的那个链接中找到下载的链接,在页面的中下部有两个下载的链接,一个是源程序,一个是示例程序。
你说的那个注释是介绍如何在VC中使用该控件。至于在VB中使用这个控件,可以把gif89.dll释放到某个目录中,然后选择菜单“工程|部件”,使用“浏览”按钮选择gif89.dll,然后选中Gif89 Class,这样你就可以在工具板中发现一个新控件了。
yanlina的意见:
在VB中嵌入GIF动画:先将GIF导入Flash中,用Flash将GIF动画转换为SWF格式,然后再在VB中使用ShockwaveFlash控件,再把SWF形式的动画插入控件中。在moive中输入路径,例如C:\Documents and Settings\yanlina1\vb\11.swf最后按F8运行就可以了。我已经用了这种方法可以实现。
此问题由李海回答。
附加关键字:编程, 源程序, programming, source code, Visual Basic, VB, 图形、图象, picture, graph, image, draw。
| |
|
|
| |
|
|