Icon not displaying when exe is created in VB 6.0
For t开发者_如何学Gohe exe generated, the Icon is not displayed. I added the Icon in the project Properties --> Make tab --> Application --> Icon. I am using Vb 6.0 I can see the icon in the project properties. but the same is not displayed when the exe is generated.
I added the icon in the resource file too. But its not displayed. I added the image for it.
Any ideas on displaying the icon for the exe generated?
We've had problems with that in the past. I'm pretty sure it has to do with your icon dimensions being out of scope. Hack workaround - add a dummy form (frmIconHolder) with the 32x32 icon you want as the icon for that form. Then in the project Properties --> Make tab --> Application --> Icon, set it to this new form.
There are 2 methods to setting your exe's icon:
1: Set your Main Form's icon to the icon you want to use for the exe. On the make tab, from the Application Icon drop-down, select your form that has the icon you want to use. Compile.
2: Using a resource file. To do this, check out this forum post. Using this method, you have to use icons with max 256 colors.
The empirically-found boundaries for VB6 icons are: ICO format on ly, 48x48 in size, 16/24-bit colours
Make sure that your Icon does not exceed 256 colors and it has both 16x16 and 32x32 images in it.
精彩评论