Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1460

VB6 - Simple Animated GIF Player (supports transparency) using WinRT / BitmapDecoder

$
0
0
This project uses the BitmapDecoder WinRT class to decode a GIF file into its individual frames. These frames can then be rendered into any device context (Form, PictureBox, etc) using vanilla GDI functions.

A TypeLib with the required WinRT interface definitions is included in the ZIP archive, don't forget to set a reference to it.

Here's a classic GIF showing Commander Data losing his temper over the once ubiquitous blue screen of death:



The project also supports more complex GIFs (such as those with partial frames, as well as frames with transparency):



Here is the demo project: GIFPlayer.zip (Updated!) - Download the GIFs above and place them in the project folder as they were too big to include in the attachment or provide your own GIFs for testing.

Requirements: Windows 10 (fully updated!)
Attached Files

Viewing all articles
Browse latest Browse all 1460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>