Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/156.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 带有GIF图像的Webbrowser中的动画问题_C#_Winforms_Animation_Webbrowser Control_Gif - Fatal编程技术网

C# 带有GIF图像的Webbrowser中的动画问题

C# 带有GIF图像的Webbrowser中的动画问题,c#,winforms,animation,webbrowser-control,gif,C#,Winforms,Animation,Webbrowser Control,Gif,我的表单上有一个Webbrowser控件 我通过html表从我的应用程序StartUppath加载一个图像 请参见此处的代码: image load.gif位于同一目录中 然后我通过以下方式加载Webbrowser: load2.Navigate(Application.StartupPath+“\\load.html”); 在第一个窗体打开时,我的gif很好,并且具有动画效果 在第二次打开时,gif不再设置动画 我能在这里做什么?重新加载不起作用。将HTML5头添加到HTML:,添加仿真

我的表单上有一个Webbrowser控件

我通过html表从我的应用程序StartUppath加载一个图像

请参见此处的代码:


image load.gif位于同一目录中

然后我通过以下方式加载Webbrowser:

load2.Navigate(Application.StartupPath+“\\load.html”);
在第一个窗体打开时,我的gif很好,并且具有动画效果

在第二次打开时,gif不再设置动画


我能在这里做什么?重新加载不起作用。

将HTML5头添加到HTML:
,添加仿真模式元标记:
。将图像存储在包含
.html
文件的同一文件夹中。在
中更改图像源(您不在服务器上)。创建路径的URI:
var animationPath=newURI(Path.Combine(Application.StartupPath,“load.html”);加载2.导航(动画路径)