How does icon image format support vary by version of Windows?

梦想与她 提交于 2019-12-11 15:33:10

问题


I recently had an issue where I was able to add an icon to a (VB6) form on one PC where it worked fine, but they was unable to run/compile it on a second PC.

It turned out that the icon file was 32-bit (including an alpha channel) and this was the problem. But I was surprised that this was a system-dependent feature.

(In this specific example it was Win10 x64 which allowed the 32-bit icon, and Win7 x32 which did not).

So now it seems quite unclear what icons are permissible to use in VB6 in which versions of Windows?


I have seen examples such as this question which have a similar issue, and this other question outlines what may have been the original VB6 features when it was new (?) but I can't yet find information that comprehensively breaks down what has changed based on Windows version.

This is important because we don't need to necessarily live within the limitations of (say) Windows XP if we know we are deploying to Windows 8 / 10 only. But nor do I want to risk that a fraction of users will have some dire problem because of this.


I've dug into this a little more - it appears that the Windows API function OleLoadPicturePath() behaves differently in the two Windows versions I mentioned above. On Win7, it will error out with a 32-bit icon; but on Win10 it does not. I'm not sure if there are other API functions which differ also, or not.

来源:https://stackoverflow.com/questions/54253845/how-does-icon-image-format-support-vary-by-version-of-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!