public static extern bool GetCursorInfo(out CURSORINFO pci);
public static SUIBitmap GetCursorImage(ref int x, ref int y) { Bitmap bmp; IntPtr hicon; CURSORINFO ci = new CURSORINFO(); ICONINFO icInfo; ci.cbSize = Marshal.SizeOf(ci); if (SUIWinAPIs.GetCursorInfo(out ci)) { if (ci.flags == SUIMessage.CURSOR_SHOWING) { hicon = SUIWinAPIs.CopyIcon(ci.hCursor); if (SUIWinAPIs.GetIconInfo(hicon, out icInfo)) { x = ci.ptScreenPos.X - ((int)icInfo.xHotspot); y = ci.ptScreenPos.Y - ((int)icInfo.yHotspot); Icon ic = Icon.FromHandle(hicon); bmp = ic.ToBitmap(); return new SUIBitmap(bmp, null); } } } return null; }