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