• 大小: 1.28M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: winform  图片  

资源简介

一个播放gif图片的实例,如图

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PlayGifAnimation
{
    public partial class Frm_Main : Form
    {
        public Frm_Main()
        {
            InitializeComponent();
        }

        Bitmap bitmap = new Bitmap(Application.StartupPath + “\\1.gif“); //实例化一个GDI+绘图图面对象
        bool current = false; //初始化一个bool型的变量current
        public void PlayImage()
        {
            if (!current)  //当该值为true时
            {
                ImageAnimator.Animate(bitmap new EventHandler(this.OnframeChanged));  //将多帧图片显示为动画图像
                current = true;  //设定current的值为true
            }
        }
        private void OnF

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-28 09:56  PlayGifAnimation\
     目录           0  2011-12-22 23:11  PlayGifAnimation\PlayGifAnimation\
     文件         938  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation.sln
     文件       15360  2010-11-04 18:53  PlayGifAnimation\PlayGifAnimation.suo
     文件       26624  2013-04-28 09:56  PlayGifAnimation\PlayGifAnimation.v11.suo
     目录           0  2011-12-22 23:11  PlayGifAnimation\PlayGifAnimation\bin\
     目录           0  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\bin\Debug\
     文件     1327347  2007-07-11 19:22  PlayGifAnimation\PlayGifAnimation\bin\Debug\1.gif
     文件        9216  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\bin\Debug\PlayGifAnimation.exe
     文件       24064  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\bin\Debug\PlayGifAnimation.pdb
     文件        1756  2010-07-10 22:17  PlayGifAnimation\PlayGifAnimation\Frm_Main.cs
     文件        2676  2010-07-09 17:16  PlayGifAnimation\PlayGifAnimation\Frm_Main.designer.cs
     文件        5814  2010-07-09 17:16  PlayGifAnimation\PlayGifAnimation\Frm_Main.resx
     目录           0  2011-12-22 23:11  PlayGifAnimation\PlayGifAnimation\obj\
     目录           0  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\
     文件        7188  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        2539  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.csproj.FileListAbsolute.txt
     文件         850  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.csproj.GenerateResource.Cache
     文件        1757  2013-04-28 09:47  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.csprojResolveAssemblyReference.cache
     文件        9216  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.exe
     文件         180  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.Frm_Main.resources
     文件       24064  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.pdb
     文件         180  2013-04-28 09:48  PlayGifAnimation\PlayGifAnimation\obj\Debug\PlayGifAnimation.Properties.Resources.resources
     目录           0  2011-12-22 23:11  PlayGifAnimation\PlayGifAnimation\obj\Debug\Refactor\
     目录           0  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation\obj\Debug\TempPE\
     文件        4608  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
     文件        4001  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation\PlayGifAnimation.csproj
     文件         500  2010-07-09 17:16  PlayGifAnimation\PlayGifAnimation\Program.cs
     目录           0  2011-12-22 23:11  PlayGifAnimation\PlayGifAnimation\Properties\
     文件        1364  2010-07-09 17:15  PlayGifAnimation\PlayGifAnimation\Properties\AssemblyInfo.cs
     文件        2872  2013-04-28 09:46  PlayGifAnimation\PlayGifAnimation\Properties\Resources.Designer.cs
............此处省略3个文件信息

评论

共有 条评论