For system-wide cursor change:
Code:
[DllImport("user32.dll")]
private static extern IntPtr LoadImage(
IntPtr hinst,
string lpszName,
uint uType,
int cxDesired,
int cyDesired,
uint fuLoad
);
private const int IDC_CROSS = 32515;
private const int LR_SHARED = 0x8000;
private const int IMAGE_CURSOR = 2;
Code:
IntPtr hCursor = LoadImage(NULL, MAKEINTRESOURCE(IDC_CROSS), IMAGE_CURSOR, 0, 0, LR_SHARED);
Code:
[DllImport("user32.dll")]
private static extern IntPtr SetCursor(
IntPtr hCursor
);
Code:
SetCursor(hCursor);