GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AnimateGIF Property
Example





In This Topic
AnimateGIF Property (GdViewer)
In This Topic
Specifies whether the GdViewer control must animate the currently loaded multi-frame GIF image by defaut, for example when displaying the image or refreshing the control. If this property is set to true, the image will playing in the loop.
Syntax
'Declaration
 
Public Property AnimateGIF As Boolean
public bool AnimateGIF {get; set;}
public read-write property AnimateGIF: Boolean; 
public function get,set AnimateGIF : boolean
public: __property bool get_AnimateGIF();
public: __property void set_AnimateGIF( 
   bool value
);
public:
property bool AnimateGIF {
   bool get();
   void set (    bool value);
}

Property Value

The default value is true.
Remarks
Please note that changing this value to true starts playing the displayed GIF image using the GifPlay method and changing this value to false ends playing the displayed GIF image using the GifStop method.

At the same, calling the GifPlay method sets this property to true and calling the GifStop method sets this property to false.

Example
How to utilize this property in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
            
'Disabling to play the loaded GIF file automatically.
GdViewer1.AnimateGIF = False
If GdViewer1.DisplayFromFile("image_to_play.gif") = GdPictureStatus.OK Then
    'Enabling to play the loaded GIF file in a loop.
    GdViewer1.AnimateGIF = True
End If
//We assume that the GdViewer1 control has been properly integrated.
            
//Disabling to play the loaded GIF file automatically.
GdViewer1.AnimateGIF = false;
if (GdViewer1.DisplayFromFile("image_to_play.gif") == GdPictureStatus.OK)
{
    //Enabling to play the loaded GIF file in a loop.
    GdViewer1.AnimateGIF = true;
}
See Also