Home All Groups Group Topic Archive Search About

How to add multiple icons to the EXE?

Author
11 May 2005 4:46 PM
Frank Rizzo
Some EXEs have a bunch of icons embedded in it.  Like for instance,
Excel.exe has 22 icons in it.  They use it to display both the
application icon (that would be the first icon) and document icons (2nd,
3rd, 4th, etc...).

How can I add multiple icons to my EXE created by VB6?

Thanks

Author
11 May 2005 4:55 PM
Bob Butler
"Frank Rizzo" <n***@none.com> wrote in message
news:ObQL2jkVFHA.2700@TK2MSFTNGP12.phx.gbl
> Some EXEs have a bunch of icons embedded in it.  Like for instance,
> Excel.exe has 22 icons in it.  They use it to display both the
> application icon (that would be the first icon) and document icons
> (2nd, 3rd, 4th, etc...).
>
> How can I add multiple icons to my EXE created by VB6?

two options come to mind immediately:
1) You can assign different icons to different forms
2) You can use a resource file

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Author
11 May 2005 6:05 PM
Frank Rizzo
Bob Butler wrote:
Show quote
> "Frank Rizzo" <n***@none.com> wrote in message
> news:ObQL2jkVFHA.2700@TK2MSFTNGP12.phx.gbl
>
>>Some EXEs have a bunch of icons embedded in it.  Like for instance,
>>Excel.exe has 22 icons in it.  They use it to display both the
>>application icon (that would be the first icon) and document icons
>>(2nd, 3rd, 4th, etc...).
>>
>>How can I add multiple icons to my EXE created by VB6?
>
>
> two options come to mind immediately:
> 1) You can assign different icons to different forms
> 2) You can use a resource file
>

But then, let's says I want to assign the second icon to an application
file.  For instance, my app saves files with an .sqa extention.  When
users click on an .sqa file, my app gets launched.  I want to assign
..sqa files a certain icon, different from the main application icon.
This is done in the registy.  For instance, for .csv files Excel assigns
the following:

excel.exe, 4

So I am trying to replicate the same in my app.
Author
11 May 2005 6:58 PM
Karl E. Peterson
Frank Rizzo wrote:
Show quote
> Bob Butler wrote:
>> "Frank Rizzo" <n***@none.com> wrote in message
>> news:ObQL2jkVFHA.2700@TK2MSFTNGP12.phx.gbl
>>
>>> Some EXEs have a bunch of icons embedded in it.  Like for instance,
>>> Excel.exe has 22 icons in it.  They use it to display both the
>>> application icon (that would be the first icon) and document icons
>>> (2nd, 3rd, 4th, etc...).
>>>
>>> How can I add multiple icons to my EXE created by VB6?
>>
>>
>> two options come to mind immediately:
>> 1) You can assign different icons to different forms
>> 2) You can use a resource file
>>
>
> But then, let's says I want to assign the second icon to an
> application file.  For instance, my app saves files with an .sqa
> extention.  When users click on an .sqa file, my app gets launched.
> I want to assign .sqa files a certain icon, different from the main
> application icon. This is done in the registy.  For instance, for
> .csv files Excel assigns the following:
>
> excel.exe, 4
>
> So I am trying to replicate the same in my app.

What have you actually done, in this "trying" you speak of?  Bob gave you the answer.
Seems you just need to "try" associating an icon manually, to get the numerical
ordering of the embedded icons, no?  Is there something you're actually having
difficulty with?
--
Working Without a .NET?
http://classicvb.org/petition
Author
11 May 2005 8:20 PM
Frank Rizzo
>>>
What have you actually done, in this "trying" you speak of?  Bob gave
you the answer. Seems you just need to "try" associating an icon
manually, to get the numerical ordering of the embedded icons, no?  Is
there something you're actually having difficulty with?
<<<

Karl,

Here is the part I don't get.  In vb6, I go File/Make MyApp.Exe
In the Make Project dialog, I click Options...
Then I pick the application icons from various icons already assigned to
various forms.  I ok my way back to the Make Project dialog and click Ok
to compile the app.

Now I examine the EXE using a tool such as Microangelo (or various
ExtractIconEx based tools) - it reports that then compiled .exe only has
one icon. Even though, per Bob's suggestion #1, I added different icons
to different forms.  In contrast, if I examine Excel.exe, it reports 22
icons.

As far as Bob's #2 suggestion - resources - that's fine, but I don't
know where to go with this.  So I created a resource file and added a
bunch of icons there (btw, it won't accept true-color icons).  How can I
now select the resource file as the source of the application icon?

Thanks




Karl E. Peterson wrote:
Show quote
> Frank Rizzo wrote:
>
>>Bob Butler wrote:
>>
>>>"Frank Rizzo" <n***@none.com> wrote in message
>>>news:ObQL2jkVFHA.2700@TK2MSFTNGP12.phx.gbl
>>>
>>>
>>>>Some EXEs have a bunch of icons embedded in it.  Like for instance,
>>>>Excel.exe has 22 icons in it.  They use it to display both the
>>>>application icon (that would be the first icon) and document icons
>>>>(2nd, 3rd, 4th, etc...).
>>>>
>>>>How can I add multiple icons to my EXE created by VB6?
>>>
>>>
>>>two options come to mind immediately:
>>>1) You can assign different icons to different forms
>>>2) You can use a resource file
>>>
>>
>>But then, let's says I want to assign the second icon to an
>>application file.  For instance, my app saves files with an .sqa
>>extention.  When users click on an .sqa file, my app gets launched.
>>I want to assign .sqa files a certain icon, different from the main
>>application icon. This is done in the registy.  For instance, for
>>.csv files Excel assigns the following:
>>
>>excel.exe, 4
>>
>>So I am trying to replicate the same in my app.
>
>
> What have you actually done, in this "trying" you speak of?  Bob gave you the answer.
> Seems you just need to "try" associating an icon manually, to get the numerical
> ordering of the embedded icons, no?  Is there something you're actually having
> difficulty with?
Author
11 May 2005 8:36 PM
Frank Rizzo
Carl,

My apologies, I found an old article of yours
(http://vb.mvps.org/articles/pt199701.pdf) which explained everything.

Thanks



Frank Rizzo wrote:
Show quote
>  >>>
> What have you actually done, in this "trying" you speak of?  Bob gave
> you the answer. Seems you just need to "try" associating an icon
> manually, to get the numerical ordering of the embedded icons, no?  Is
> there something you're actually having difficulty with?
> <<<
>
> Karl,
>
> Here is the part I don't get.  In vb6, I go File/Make MyApp.Exe
> In the Make Project dialog, I click Options...
> Then I pick the application icons from various icons already assigned to
> various forms.  I ok my way back to the Make Project dialog and click Ok
> to compile the app.
>
> Now I examine the EXE using a tool such as Microangelo (or various
> ExtractIconEx based tools) - it reports that then compiled .exe only has
> one icon. Even though, per Bob's suggestion #1, I added different icons
> to different forms.  In contrast, if I examine Excel.exe, it reports 22
> icons.
>
> As far as Bob's #2 suggestion - resources - that's fine, but I don't
> know where to go with this.  So I created a resource file and added a
> bunch of icons there (btw, it won't accept true-color icons).  How can I
> now select the resource file as the source of the application icon?
>
> Thanks
>
>
>
>
> Karl E. Peterson wrote:
>
>> Frank Rizzo wrote:
>>
>>> Bob Butler wrote:
>>>
>>>> "Frank Rizzo" <n***@none.com> wrote in message
>>>> news:ObQL2jkVFHA.2700@TK2MSFTNGP12.phx.gbl
>>>>
>>>>
>>>>> Some EXEs have a bunch of icons embedded in it.  Like for instance,
>>>>> Excel.exe has 22 icons in it.  They use it to display both the
>>>>> application icon (that would be the first icon) and document icons
>>>>> (2nd, 3rd, 4th, etc...).
>>>>>
>>>>> How can I add multiple icons to my EXE created by VB6?
>>>>
>>>>
>>>>
>>>> two options come to mind immediately:
>>>> 1) You can assign different icons to different forms
>>>> 2) You can use a resource file
>>>>
>>>
>>> But then, let's says I want to assign the second icon to an
>>> application file.  For instance, my app saves files with an .sqa
>>> extention.  When users click on an .sqa file, my app gets launched.
>>> I want to assign .sqa files a certain icon, different from the main
>>> application icon. This is done in the registy.  For instance, for
>>> .csv files Excel assigns the following:
>>>
>>> excel.exe, 4
>>>
>>> So I am trying to replicate the same in my app.
>>
>>
>>
>> What have you actually done, in this "trying" you speak of?  Bob gave
>> you the answer.
>> Seems you just need to "try" associating an icon manually, to get the
>> numerical
>> ordering of the embedded icons, no?  Is there something you're
>> actually having
>> difficulty with?
Author
11 May 2005 9:00 PM
Karl E. Peterson
Hi Frank --

> My apologies, I found an old article of yours
> (http://vb.mvps.org/articles/pt199701.pdf) which explained everything.

Cool!  I knew there was a good reason to post that stuff. <g>

Later...   Karl
--
Working Without a .NET?
http://classicvb.org/petition

AddThis Social Bookmark Button