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

VB6 ImageCaching and -Animation (using a single Resource-File for storage)

$
0
0
Just a Demo which applies the cGDIPlusCache-Class (as intended, as a Drop-In-Module).

The original CodeBank-entry for cGDIPlusCache is here: https://www.vbforums.com/showthread....-cls-revisited

cGDIPlusCache (as included in this Demo) was enhanced about two new Methods:
  • SaveCacheToImgStore(StoreFileName As String)
  • ReadCacheFromImgStore(StoreFileName As String)


When run in IDE-Mode, the Demo will populate the GC-CacheObject directly from a \Res\-Subfolder -
(via GC-Add... Methods which in this case load PNGs, JPGs or GIFs directly from the FileSystem)

When the MainForm unloads (in IDE-Mode), then one of the new Methods is used:
  • GC.SaveCacheToImgStore App.Path & "\ImageCache.gc"


So that, when the Demo runs compiled, it will ignore the Files in the \Res\-Subfolder (so no need to deploy it) -
and instead loads the GC-Objects Cache-Content from a single File via:
  • GC.ReadCacheFromImgStore App.Path & "\ImageCache.gc"


The whole User-Code (aside from the dropped-in cGDIPlusCache.cls-File) -
sits in a single Form (with only about 25 Lines).

That's enough to ensure a Checker-BackGround and two Animations (one from a GIF, another one from a "PNG-stripe").
Name:  ImageCaching.png
Views: 74
Size:  15.5 KB

Ok, here is the Zip: ImageCaching.zip

Have fun,

Olaf
Attached Images
 
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>