getting small icon from embded icon resource

B

Brian Henry

I have an icon in my app as an embeded resource.. i am accessing it through
the assemblies getmainfestresourcestream method of the assembly. The icon
has a 32x32 and a 16x16 icon in the same icon resource, I want to draw the
16x16 one on the screen, how would I do this? the only icon i get back when
making a icon object out of it is 32x32.. but i need the smaller one,
thanks!
 
M

Mick Doherty

using the MultiIcon class (http://www.codeproject.com/dotnet/MultiIcon.asp),
just change icoStream from type 'IO.MemoryStream' to type 'IO.Stream'

You can then use GetManifestResourceStream().

\\\
System.Reflection.Assembly Assy =
this.GetType().Assembly.GetExecutingAssembly();

thisIcon = new multiIcon(Assy.GetManifestResourceStream(
"myNameSpace.App.ico"))
///
 

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