0
votes

I have icons (.ico) in my vb6 application. They are of various dimension 16x16 and 32x32.

I want all the icons to be converted to 48x48 256 image format. Can I load a 48x48 icon file (.ico) in a VB6 form?

I want to know if VB6 support any other image format apart from .ico files?

Thanks

1
You can assign a standard .ICO-format icon with just a 256-color 48x48 pixel image to a VB6 Form and it works just fine. Of course scaling will be used where smaller sizes are required, but I assume you know that.Bob77

1 Answers

1
votes

VB6 is capable of using icon files (.ico), including icon files with 48x48 pixel icons. I presume you were referring to Icons that can be assigned to forms for the purpose of displaying them on their title bars, in the far top-left corner. This can be done by assigning an Icon file to each form's Icon property during design time; or at run time, usually from either an ImageList control or Resource file (.res). However, with the exception of some Cursor files (.cur), VB6 is not capable of displaying an image for the same purpose, using another file format other than .ico (.bmp, .gif, .jpg, etc. cannot be used).

Icon images can also be used to display images elsewhere on forms, such as through the use of the PictureBox and Image controls.

Please note that there is no need to convert multiple icons to a particular format, as single Icon files (.ico) are capable of storing multiple icons of different dimensions and colour depths. When multiple icons are present within a program's icon resource, Windows Explorer will display the appropriate icon dimension for a particular file / folder view. For example, a 16x16 pixel version of the icon will be shown in "Small Icon", "Details" and "List" views, while a 48x48 pixel version will appear when the view is set to "Medium Icons". When a particular version of an icon is not available, Windows Explorer will usually try to use one of the other versions that is closest to what needs to be displayed for a particular view, which may involve stretching an icon to a larger or smaller size. Pixels of colours not able to be displayed from a high colour (24 bit) icon in a 256 colour mode, will be converted automatically to their closest equivalents, from a default system colour palatte. The disadvantage of the absence of multiple versions of the same icon, is that the quality of the icons will be reduced in particular file / folder views.