LoadCursor (user32)
Last changed: CodeMajster-209.252.71.161

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern IntPtr LoadCursor(IntPtr hInstance, string lpCursorName);

User-Defined Types:

IDC_

Notes:

This function may not solve your problems when trying to load animated or colored cursors stored as embedded resources. I've wasted hours trying to get it to work to no avail. The LoadCursorFromFile method however works perfectly, so you might want to extract your cursor resource to a temp file and use the P/Invoke for that function.

Tips & Tricks:

If you specify the hInstance as IntPtr.Zero, then you can specify one of the constants in IDC_ as the CursorName to utilize system defined cursors.

Sample Code:

    IntPtr handle = LoadCursor(IntPtr.Zero, IDC_Arrow);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
LoadCursor on MSDN