Kieron Posted February 18, 2003 Posted February 18, 2003 Hi, I'm using a series of Icons as Embedded Resources. I've 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? Quote
*Gurus* divil Posted February 18, 2003 *Gurus* Posted February 18, 2003 Do you mean getting either the 32x32 or 16x16 version of an icon from the same icon file? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Gurus* divil Posted February 18, 2003 *Gurus* Posted February 18, 2003 To this, you first create your source icon, I assume using the stream returned by GetManifestResourceStream. I take it you're doing this already. You then use the following to extract the different sized icons from it: iconLarge = New Icon(iconSource, New Size(32, 32)) iconSmall = New Icon(iconSource, New Size(16, 16)) iconLarge = new Icon(iconSource, new Size(32, 32)); iconSmall = new Icon(iconSource, new Size(16, 16)); Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.