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

S

Shane Story

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.
 
M

Mick Doherty

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.
 
H

Herfried K. Wagner [MVP]

* "Mick Doherty said:
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...
 
S

Shane Story

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
 
M

Mick Doherty

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.
 
H

Herfried K. Wagner [MVP]

* "Mick Doherty said:
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"...

;-(
 
H

Herfried K. Wagner [MVP]

* "Shane Story said:
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.
 
S

Shane Story

fix 100 things wrong with visual studio and break 50 that worked before...
??
:)

-Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top