473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Embed Multiple Icons in MY EXE (VB.NET Program)

I would like to embed mutiple icons inside my main exe file so that they can
be viewed like
Shell32.dll or whatever.

Can't figure out how to do this.

Sorry if this is in the wrong group. Wasn't sure where to ask..

Thanks,

Shane

end result---for one thing.. I want doc associations in my setup to be able
to choose from an icon in the exe.
Nov 20 '05 #1
8 5180
* "Shane Story" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
I would like to embed mutiple icons inside my main exe file so that they can
be viewed like
Shell32.dll or whatever.


This is not possible with the IDE. You will have to use the command
line compiler ("vbc.exe"):

<http://mvps.org/dotnet/dotnet/samples/codingtechnique/downloads/ResourceIcons.zip>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
You can open the compiled executable in the IDE and add Icon resources. The
only problem here is that if you recompile the project, the Icons will
dissapear and you will have to do it again.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
* "Shane Story" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
I would like to embed mutiple icons inside my main exe file so that they can be viewed like
Shell32.dll or whatever.
This is not possible with the IDE. You will have to use the command
line compiler ("vbc.exe"):

<http://mvps.org/dotnet/dotnet/sample...ds/ResourceIco
ns.zip>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
* "Mick Doherty" <EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> scripsit:
You can open the compiled executable in the IDE and add Icon resources. The
only problem here is that if you recompile the project, the Icons will
dissapear and you will have to do it again.


Would be interesting if this can be automated using an add-in. The
icons can be added with p/invoke calls to 'UpdateResource' too...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Can you not use the ResEdit that comes with VSNET2003 to produce a res file?

it only produces .resx and .resources---is .resources the same as .res?

If so I should create it there and maybe add an external tool that calls vbc
on the app or something.

What a pain.

Looks like MS would have thought of this. For now I will just ship the
icons as ico files I guess.

Seems everything with MS is 85% excellent but the 15% that should have been
done to make a simple app is always missing. :(

Any more Ideas appreciated.

Shane

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
* "Shane Story" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
I would like to embed mutiple icons inside my main exe file so that they can be viewed like
Shell32.dll or whatever.
This is not possible with the IDE. You will have to use the command
line compiler ("vbc.exe"):

<http://mvps.org/dotnet/dotnet/sample...ds/ResourceIco
ns.zip>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
In fact UpdateResource may be the way to go, since the IDE seems to Flatten
Alpha Icons, just as the framework in general does. Must be about time MS
sorted that out.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
* "Mick Doherty"

<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> scripsit:
You can open the compiled executable in the IDE and add Icon resources. The only problem here is that if you recompile the project, the Icons will
dissapear and you will have to do it again.


Would be interesting if this can be automated using an add-in. The
icons can be added with p/invoke calls to 'UpdateResource' too...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #6
* "Shane Story" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
Can you not use the ResEdit that comes with VSNET2003 to produce a res file?

it only produces .resx and .resources---is .resources the same as .res?
That are .NET resources, we are talking about "old" Win32 resources.
You can create RC and RES files using VS.NET directly ("File" -> "New"
-> "File..." -> "Resource Template").
If so I should create it there and maybe add an external tool that calls vbc
on the app or something.

What a pain.

Looks like MS would have thought of this. For now I will just ship the
icons as ico files I guess.


Would be nice if it was possible to edit the command line VS.NET uses
for compilation like in C# in the project properties.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
* "Mick Doherty" <EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> scripsit:
In fact UpdateResource may be the way to go, since the IDE seems to Flatten
Alpha Icons, just as the framework in general does. Must be about time MS
sorted that out.


ACK. The icon support is "poor"...

;-(

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8
fix 100 things wrong with visual studio and break 50 that worked before...
??
:)

-Shane
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
* "Shane Story" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
Can you not use the ResEdit that comes with VSNET2003 to produce a res file?
it only produces .resx and .resources---is .resources the same as .res?


That are .NET resources, we are talking about "old" Win32 resources.
You can create RC and RES files using VS.NET directly ("File" -> "New"
-> "File..." -> "Resource Template").
If so I should create it there and maybe add an external tool that calls vbc on the app or something.

What a pain.

Looks like MS would have thought of this. For now I will just ship the
icons as ico files I guess.


Would be nice if it was possible to edit the command line VS.NET uses
for compilation like in C# in the project properties.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mts | last post by:
First, let me say that I hope I have selected the correct discussion group for these questions. I would like to display the version (major.minor.build) of my project in the final build. I can...
3
by: SlasherStanley | last post by:
I have wrote a c# app and included the default app.ico file and then compliled it. When I create a shortcut to the application on the destop, I would like the option of selecting from a choice...
3
by: Tintin | last post by:
Hi all, I Googled without lucky. I want my app has more than one icon like ACDSee or MS Word. Thank in advance.
1
by: Jake Wharton | last post by:
Right now i have embedded an icon file in my project with 6 different individual icons in it. I currently use Bitmap icon = new Bitmap(this.GetType(), "App.ico"); to load in the icon but it...
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
2
by: SharpCoderMP | last post by:
i'm trying to embed multiple program icons in my executable. the only way so far i managed to do that is to embed native win32 resource file with multiple icons. it works, but... when i create a...
4
by: JR | last post by:
Hi, How can I add multible icons into 1 file likeSHELL32.dll from windows it has about 50 Jan
0
by: Stuman | last post by:
>From a previous message that I am unable to reply to, here it is again From: Steve Podradchik - view profile Date: Wed, Mar 5 2003 4:29 am Email: "Steve Podradchik"...
1
by: Adhal | last post by:
Hi, Can someone tell me how I can create an exe that has icons that I can have the shell use. So I want to be able to embed the icons and when I associate the file I pass the exe with the icon...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.