GdPicture.NET Reference Guide
GifPlay Method (GdViewer)
Example 





GdPicture14.WPF Namespace > GdViewer Class : GifPlay Method
Plays a GIF animation referring to the file displayed in the GdViewer control in a loop.
Syntax
'Declaration
 
Public Sub GifPlay() 
public void GifPlay()
public procedure GifPlay(); 
public function GifPlay();
public: void GifPlay(); 
public:
void GifPlay(); 
Remarks
Just to inform you, that if the displayed file is not an animated GIF file, the method does nothing. At the same, you can only play one animation in time.

Please note that the AnimateGIF property is set to True/true 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

Reference

GdViewer Class
GdViewer Members
AnimateGIF Property
GifStop Method