Extracting Icons from an Assembly...

Kieron

Member
Joined
Nov 19, 2002
Messages
15
Location
England
Hi,

Im using a series of Icons as Embedded Resources. Ive several difference sizes of the same icon, e.g. Customer16.ico, Customer32.ico... etc.

Is there a way of extracting the required icon from a single icon file?
 
Do you mean getting either the 32x32 or 16x16 version of an icon from the same icon file?
 
To this, you first create your source icon, I assume using the stream returned by GetManifestResourceStream. I take it youre doing this already. You then use the following to extract the different sized icons from it:

Code:
iconLarge = New Icon(iconSource, New Size(32, 32))
iconSmall = New Icon(iconSource, New Size(16, 16))

C#:
iconLarge = new Icon(iconSource, new Size(32, 32));
iconSmall = new Icon(iconSource, new Size(16, 16));
 
Back
Top