Example





In This Topic

GifStop Method (GdViewer)

In This Topic
Stops the currently played GIF animation referring to the file displayed in the GdViewer control.
Syntax
'Declaration
 
Public Sub GifStop() 
public void GifStop()
public procedure GifStop(); 
public function GifStop();
public: void GifStop(); 
public:
void GifStop(); 
Remarks
Just to inform you that you can only play one animation in time.

Please note that the AnimateGIF property is set to false using this method.

Example
How to start and stop playing a displayed GIF file.
'We assume that the GdViewer1 control has been properly integrated
'and your GIF file has been properly displayed as well.
Sub ButtonPlay_Click(sender As Object, e As EventArgs) Handles ButtonPlay.Click
    If GdViewer1.GetLastPath().EndsWith(".gif") Then
        GdViewer1.GifPlay()
    End If
End Sub
Sub ButtonStop_Click(sender As Object, e As EventArgs) Handles ButtonStop.Click
    GdViewer1.GifStop()
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and your GIF file has been properly displayed as well.
void buttonPlay_Click(object sender, EventArgs e)
{
    if (GdViewer1.GetLastPath().EndsWith(".gif"))
        GdViewer1.GifPlay();
}
void buttonStop_Click(object sender, EventArgs e)
{
    GdViewer1.GifStop();
}
See Also