A control for displaying animated gif images | CodeGuru

A control for displaying animated gif images

Note: Reading and/or writing of GIF images requires a license to use Unisys patented Lempel Ziv Welch (LZW) data compression and decompression technology from Unisys. GNU software states the following: “No license or license fees are required for non-commercial, not-for-profit GIF-based applications or for non-commercial, not-for-profit GIF-freeware, so long as the LZW capability provided is […]

Written By
CodeGuru Staff
CodeGuru Staff
Oct 25, 1998
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Note: Reading and/or writing of GIF images requires a license to use Unisys
patented Lempel Ziv Welch (LZW) data compression and decompression technology from
Unisys.

GNU software states the
following:

“No license or license fees are required for non-commercial, not-for-profit GIF-based
applications or for non-commercial, not-for-profit GIF-freeware, so long as the LZW
capability provided is only for GIF. However, a license is required if freeware is
incorporated into, or sold or distributed with a commercial or for-profit product, introduced
in 1995 [or later], or enhancements of products that were introduced prior to 1995.”

More information can be found at Unisys.

Description:

This Component ‘Gif89a’  was created with VC 5.0
and ATL.  You don’t need any DLL for using this control (even atl.dll and
mfc….dll). The source code is provided.

This control has 7 properties and 3 methods and can be used to play any animated
gif file.

Properties of the Control:

Filename – name of your GIF file.

Autosize – control will change size
automatically when you load new GIF image by setting Filename property.

Autostart – control will show picture
automatically when you set Filename property.

Speed – delay in 1/100 sec. If GIF
itself doesn’t has delay control will use this number.

Embed – when true control will store
GIF file in exe module. You can use it only in dialog form when you create this
form with dialog editor.

Class – when false control will paint
empty space with background color of OleContainer. If true then control will not
do it. Use this property only in case when you have background bitmap.

Advertisement

Methods of the Control:

Stop – understandable.

Start – understandable.

About – you will see a little dialog
box with information about me.

Download demo project and Control – 191 KB

Download source – 30 KB

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.