Tuesday, January 17, 2012

Convert Bitmap to Icon

This is quite easy to achieve by using the following procedure:

        public static Icon ToIcon(Bitmap bmp)
        {
            IntPtr i = bmp.GetHicon();
            Icon ic = Icon.FromHandle(i);

            return ic;
        }

No comments:

Post a Comment