Accessing Images from Compressed Folders

OpenInsight’s BITMAP property allows developers access images by path name or from within a resource file (.DLL or .EXE):

// Pull image from a path. 
Set_Property(Ctrl, 'BITMAP', 'BMPS\Check.png') 

// Pull image from a resource file. 
Set_Property(Ctrl, 'BITMAP', 'Images.dll#check')

Storing images within a resource file makes an application more professional and prevents the curious end user from modifying the images stored on the hard drive. However, many developers are unfamiliar with the technology necessary to manage images from within a resource file. Most software development kits provide tools for this. If you are unfamiliar with (or would rather not learn) these SDKs there are simple utilities that can be downloaded to make this relatively easy (e.g. one that seems to work well is Resource Hacker.)

As might be expected, all SRP ActiveX image based properties can load images from a path or resource file. However, for developers who like the idea of using a single file to store all their images but would rather not fiddle with resource files there is another option: zip files. Developers can put all of their images into a zip file (aka compressed folder) and use the same syntax to reference them. The .zip extension can even be renamed to obscure this even more:

// Pull image from a zip file. 
Set_Property(Ctrl, 'OLE.Images', 'Images.zip#check') 

// Pull image from a zip file (extension renamed). 
Set_Property(Ctrl, 'OLE.Images', 'Images.fil#check')

Leave a Reply