|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to add multiple icons to the EXE?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 "Frank Rizzo" <n***@none.com> wrote in message two options come to mind immediately: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? 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..." Bob Butler wrote:
Show quote > "Frank Rizzo" <n***@none.com> wrote in message But then, let's says I want to assign the second icon to an application > 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 > 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. Frank Rizzo wrote:
Show quote > Bob Butler wrote: What have you actually done, in this "trying" you speak of? Bob gave you the answer.>> "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. 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? >>> 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? 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? Hi Frank --
> My apologies, I found an old article of yours Cool! I knew there was a good reason to post that stuff. <g>> (http://vb.mvps.org/articles/pt199701.pdf) which explained everything. Later... Karl |
|||||||||||||||||||||||