Selecting the size of a System.Drawing.Icon?

Andy Hin picture Andy Hin · Oct 26, 2010 · Viewed 20.9k times · Source

I have a icon which has a few different sizes (16px, 32px, 64px). I am calling ToBitmap() on it, but it is always returning the 32px image. How do I retrieve the 64px one?

Answer

Stoio picture Stoio · Nov 29, 2010

Does this help?

Icon sizedIcon = new Icon(Resources.ResourceIcon, new Size(64,64));