public static string GetCursorShape() { string result; try { WindowsAPI.CURSORINFO cURSORINFO = default(WindowsAPI.CURSORINFO); cURSORINFO.cbSize = Marshal.SizeOf(cURSORINFO); WindowsAPI.GetCursorInfo(out cURSORINFO); if (cURSORINFO.flags == 1) { result = new Cursor(cURSORINFO.hCursor).ToString(); } else { result = "(Hidden)"; } } catch (Exception) { result = "(Failure)"; } return(result); }
private static extern bool GetCursorInfo(out WindowsAPI.CURSORINFO pci);