Esempio n. 1
0
        /// <summary>Convert this bitmap to a cursor with hotspot at 'hot_spot'</summary>
        public static Cursor ToCursor(this Bitmap bm, Point hot_spot)
        {
            var tmp = new Win32.ICONINFO();

            Win32.GetIconInfo(bm.GetHicon(), ref tmp);
            tmp.xHotspot = hot_spot.X;
            tmp.yHotspot = hot_spot.Y;
            tmp.fIcon    = false;
            return(new Cursor(Win32.CreateIconIndirect(ref tmp)));
        }
Esempio n. 2
0
 public static extern bool GetIconInfo(IntPtr hIcon, out Win32.ICONINFO piconinfo);