用.NET 自带的 ImageAnimator类来播放GIF图像

1. 注册动画事件
ImageAnimator.Animate(animatedImage, new EventHandler(this.OnFrameChanged));


2. 在OnFrameChanged事件中调用this.Invalidate();

3.  在OnPaint中绘当前帧
ImageAnimator.UpdateFrames(adimatedImage);
e.Graphics.DrawImage(adinatedImage, new Point(0,0));

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2021-10-25
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2021-10-07
  • 2021-03-28
  • 2021-09-04
  • 2021-12-13
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案