Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
SetSystemCursor (user32)
.
Summary
C# Signature:
[DllImport("user32.dll")]
static extern bool SetSystemCursor(IntPtr hcur, uint id);
VB.NET Signature:
[<DllImport("user32.dll")>] _
Private Shared Function SetSystemCursor(ByVal hCursor As IntPtr, ByVal id As Integer) As Boolean
End Function
User-Defined Types:
enum OCR_SYSTEM_CURSORS : uint
{
/// <summary>
/// Standard arrow and small hourglass
/// </summary>
OCR_APPSTARTING = 32650,
/// <summary>
/// Standard arrow
/// </summary>
OCR_NORMAL = 32512,
/// <summary>
/// Crosshair
/// </summary>
OCR_CROSS = 32515,
/// <summary>
/// Windows 2000/XP: Hand
/// </summary>
OCR_HAND = 32649,
/// <summary>
/// Arrow and question mark
/// </summary>
OCR_HELP = 32651,
/// <summary>
/// I-beam
/// </summary>
OCR_IBEAM = 32513,
/// <summary>
/// Slashed circle
/// </summary>
OCR_NO = 32648,
/// <summary>
/// Four-pointed arrow pointing north, south, east, and west
/// </summary>
OCR_SIZEALL = 32646,
/// <summary>
/// Double-pointed arrow pointing northeast and southwest
/// </summary>
OCR_SIZENESW = 32643,
/// <summary>
/// Double-pointed arrow pointing north and south
/// </summary>
OCR_SIZENS = 32645,
/// <summary>
/// Double-pointed arrow pointing northwest and southeast
/// </summary>
OCR_SIZENWSE = 32642,
/// <summary>
/// Double-pointed arrow pointing west and east
/// </summary>
OCR_SIZEWE = 32644,
/// <summary>
/// Vertical arrow
/// </summary>
OCR_UP = 32516,
/// <summary>
/// Hourglass
/// </summary>
OCR_WAIT = 32514
}
Notes:
See example at http://www.pinvoke.net/default.aspx/user32/copyicon.html
None.
Tips & Tricks:
Please add some!
Sample Code:
enum IDC_STANDARD_CURSORS : int
{
IDC_ARROW = 32512,
IDC_IBEAM = 32513,
IDC_WAIT = 32514,
IDC_CROSS = 32515,
IDC_UPARROW = 32516,
IDC_SIZE = 32640,
IDC_ICON = 32641,
IDC_SIZENWSE = 32642,
IDC_SIZENESW = 32643,
IDC_SIZEWE = 32644,
IDC_SIZENS = 32645,
IDC_SIZEALL = 32646,
IDC_NO = 32648,
IDC_APPSTARTING = 32650,
IDC_HELP = 32651
}
private void SetSystemCursor()
{
private void SetSystemCursor()
{
IntPtr hcursor = LoadCursor(IntPtr.Zero, IDC_ARROW);
bool ret_val = SetSystemCursor(hcursor, OCR_NORMAL);
}
}
Alternative Managed API:
Do you know one? Please contribute it!
Documentation
The SetSystemCursor API
5/13/2014 1:44:06 PM - -184.161.90.31
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).