Discussion:
VB6: 16x16 and 32x32 application icon
(too old to reply)
Martin A. Weinberger
2006-10-22 20:54:11 UTC
Permalink
Hi All,

I would like the application icon, the icon associated with the EXE file, to
contain both the 16x16 and 32x32 ICO formats. For the desktop shortcut,
Windows would use the 32x32, but for Windows Explorer Details view Windows
would use the 16x16. I tried attaching a dual image ICO file, which contains
both a 16x16 and 32x32, but Windows only uses the 16x16 image. If I specify
a 32x32 ICO file, then the image displays properly as a 32x32, but the
Windows Explorer details view icon shows as a scaled down ICO file, which
stands to reason, as what else would Windows do? A 16x16 ICO file would
render a perfectly scaled 16x16 in WindowsExplorer but yield a stretched to
32x32 for the desktop shortcut.

I would think, as I said a the start, that a 16x16 and 32x32 ICO format file
attached to the executable would solve the problem, but it doesn't.. Is
there a way to 'have my cake and eat it too," so to speak? Is there a way to
attach both a 16x16 and 32x32 and Windows would use the approperiate format?

Thanks in advance,

Marci Weinberger
ButterflyVista
Michael C
2006-10-23 01:41:00 UTC
Permalink
Post by Martin A. Weinberger
I would think, as I said a the start, that a 16x16 and 32x32 ICO format
file attached to the executable would solve the problem, but it doesn't..
Is there a way to 'have my cake and eat it too," so to speak? Is there a
way to attach both a 16x16 and 32x32 and Windows would use the
approperiate format?
This does work, my app has icons of 128x128 (for vista), 48x48, 32x32, 24x24
and 16x16 in 32 bit color (with alpha channel for partial transparancies) as
well as everything duplicated for 256 color (except the 128x128). It could
be your icon editor. I'm using this one, it gives you a 30 day trial which
appears to give full functionality:

http://www.axialis.com/iconworkshop/

Michael
Marci Weinberger
2006-10-23 04:34:28 UTC
Permalink
Hi Michael,

I just noticed/remembered that VB6 doesn't offer tying in ICO files
directly. I am using VBAdvance (no longer sold, as I just found out) for
other purposes, but one feature is that I can specify an ICO file as the
application icon. I presume that VB6 still does the rendering, as VBAdvance
doesn't do any compiling as far as I can tell. VB6 only offers selecting the
icon based on one of the forms. I wonder if VBAdvance is maybe the culprit.

Is there a way to after a build to attach (replace rather) an ICO file with
an existing one? I would prefer a command line version, as that is easier
for building purposes.

Thanks in advance,

Marci
Michael C
2006-10-23 05:19:28 UTC
Permalink
Post by Marci Weinberger
Hi Michael,
I just noticed/remembered that VB6 doesn't offer tying in ICO files
directly. I am using VBAdvance (no longer sold, as I just found out) for
other purposes, but one feature is that I can specify an ICO file as the
application icon. I presume that VB6 still does the rendering, as
VBAdvance doesn't do any compiling as far as I can tell. VB6 only offers
selecting the icon based on one of the forms. I wonder if VBAdvance is
maybe the culprit.
Is there a way to after a build to attach (replace rather) an ICO file
with an existing one? I would prefer a command line version, as that is
easier for building purposes.
If you specify your icon form one of your forms that should work ok. For my
vb6 app my icon only has 32x32 and 16x16 icons (the 128x128 icon was for my
dot net app) but that works fine.

Michael
Michael C
2006-10-23 07:00:19 UTC
Permalink
Post by Marci Weinberger
Hi Michael,
I just noticed/remembered that VB6 doesn't offer tying in ICO files
directly. I am using VBAdvance (no longer sold, as I just found out) for
other purposes, but one feature is that I can specify an ICO file as the
application icon. I presume that VB6 still does the rendering, as
VBAdvance doesn't do any compiling as far as I can tell. VB6 only offers
selecting the icon based on one of the forms. I wonder if VBAdvance is
maybe the culprit.
Is there a way to after a build to attach (replace rather) an ICO file
with an existing one? I would prefer a command line version, as that is
easier for building purposes.
I just tested a 48x48, 32x32, 16x16 icon in 32bit with vb6 and it worked
fine. All 3 icons showed in explorer.
Post by Marci Weinberger
Thanks in advance,
Marci
Marci Weinberger
2006-10-23 13:20:53 UTC
Permalink
Hi Michael,

I don't know what you did, but it wasn't selecting a 32-bit ICO file as a
form icon, at least not if the ICO file is the same type as mine. VB6 just
says invalid picture on anything that isn't 24-bit color or less. If you
want, I would be happy to try one of your 32-bit ICO files just for giggles
to see if there is a difference. I doubt think so, but that might be a clue.
If you do send me a personal email, then remove the "tg_" from the email
address.

Thanks for your help,

Marci
Post by Michael C
Post by Marci Weinberger
Hi Michael,
I just noticed/remembered that VB6 doesn't offer tying in ICO files
directly. I am using VBAdvance (no longer sold, as I just found out) for
other purposes, but one feature is that I can specify an ICO file as the
application icon. I presume that VB6 still does the rendering, as
VBAdvance doesn't do any compiling as far as I can tell. VB6 only offers
selecting the icon based on one of the forms. I wonder if VBAdvance is
maybe the culprit.
Is there a way to after a build to attach (replace rather) an ICO file
with an existing one? I would prefer a command line version, as that is
easier for building purposes.
I just tested a 48x48, 32x32, 16x16 icon in 32bit with vb6 and it worked
fine. All 3 icons showed in explorer.
Post by Marci Weinberger
Thanks in advance,
Marci
Michael C
2006-10-23 23:27:41 UTC
Permalink
Post by Marci Weinberger
I don't know what you did, but it wasn't selecting a 32-bit ICO file as a
form icon, at least not if the ICO file is the same type as mine. VB6 just
says invalid picture on anything that isn't 24-bit color or less. If you
want, I would be happy to try one of your 32-bit ICO files just for
giggles to see if there is a difference. I doubt think so, but that might
be a clue. If you do send me a personal email, then remove the "tg_" from
the email address.
I'd be suprised if it wasn't your icon. VB6 is saying invalid icon, so I'd
say it's an invalid icon :-) I've emailed you an icon.

Michael
Michael C
2006-10-23 23:32:22 UTC
Permalink
Post by Marci Weinberger
Hi Michael,
I don't know what you did, but it wasn't selecting a 32-bit ICO file as a
form icon, at least not if the ICO file is the same type as mine. VB6 just
says invalid picture on anything that isn't 24-bit color or less. If you
want, I would be happy to try one of your 32-bit ICO files just for
giggles to see if there is a difference. I doubt think so, but that might
be a clue. If you do send me a personal email, then remove the "tg_" from
the email address.
The icon I sent contains icons for 48x48, 32x32, 16x16 in 32 bit with alpha,
256 color and 16 color. I have tried it with vb6 and it works perfectly.

Michael

Karl E. Peterson
2006-10-23 23:05:54 UTC
Permalink
Post by Martin A. Weinberger
I would think, as I said a the start, that a 16x16 and 32x32 ICO
format file attached to the executable would solve the problem, but
it doesn't.. Is there a way to 'have my cake and eat it too," so to
speak? Is there a way to attach both a 16x16 and 32x32 and Windows
would use the approperiate format?
You might find this helpful... http://vb.mvps.org/articles/ap199904.pdf
--
Working without a .NET?
http://classicvb.org/
Continue reading on narkive:
Loading...