StatusStrip标签图像(GIF)不会动画C# [英] StatusStrip Label Image (GIF) Won't Animate C#

查看:71
本文介绍了StatusStrip标签图像(GIF)不会动画C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#WinForms .NET应用程序,其中我在Windows窗体底部的StatusStrip中有一个标签。此标签设置为显示项目Resources文件夹中的动画GIF。在调用打开文件的方法时,我要做的第一件事就是让
标签可见......



    tslblProgBar.Visible = true;

    ssStatusStrip.Refresh();
$


...然后是打开表格的代码...



    //加载文件的所有代码都在这里。

    //在这里。

    //这里和这里。



...最后我隐藏了标签......



    tslblProgBar.Visible = false;

    ssStatusStrip.Refresh();
$


Probelm:GIF动画(Properties.Resources.BusyBar.gif)不会动画。必须有一个简单的解决方案。任何人?

I have a C# WinForms .NET app in which I have a label in a StatusStrip at the bottom of a Windows Form. This label is set up to show an animated GIF from the project Resources folder. When calling a method to open a file, the first thing I do is make that label visible...

    tslblProgBar.Visible = true;
    ssStatusStrip.Refresh();

...then comes the code to open the form...

    // All the code to load the file goes here.
    // And here.
    // And here and here.

...and finally I hide the label...

    tslblProgBar.Visible = false;
    ssStatusStrip.Refresh();

Probelm: The GIF animation (Properties.Resources.BusyBar.gif) won't animate. There must be an easy fix. Anyone?

更新:我在VS 2013 Ultimate中启动了这个项目,现在我正在开发它VS 2017 Pro。我只是在VS 2017开始研究它。但是在这个过程中没有任何麻烦。

Update: I started this project in VS 2013 Ultimate and now I'm working on it in VS 2017 Pro. I simply started working on it in VS 2017. No sign of trouble in the process, though.

推荐答案

密尔沃基广泛,

Hi Milwaukee Broad,

感谢您发布此处。

根据您的问题与Winform更相关,我会将其移至
Windows Forms General
 论坛以获得合适的支持。

According to your question is more related to Winform, I will move it to Windows Forms General forum for suitable support.

Visual C#讨论并询问C#编程语言,IDE,库,示例和工具。

The Visual C# discuss and ask the C# programming language, IDE, libraries, samples and tools.

如果您有一些语法或代码错误,请随时与我们联系。我们将尽力为您提供解决方案。

If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

感谢您的理解与合作。

最诚挚的问候,

Wendy


这篇关于StatusStrip标签图像(GIF)不会动画C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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