User32SetCursor Method
Sets the cursor shape.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static IntPtr SetCursor(
IntPtr hCursor
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function SetCursor (
hCursor As IntPtr
) As IntPtr
Dim hCursor As IntPtr
Dim returnValue As IntPtr
returnValue = User32.SetCursor(hCursor)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static IntPtr SetCursor(
IntPtr hCursor
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member SetCursor :
hCursor : IntPtr -> IntPtr
No code example is currently available or this language may not be supported.
- hCursor IntPtr
-
A handle to the cursor.
The cursor must have been created by the CreateCursor function
or loaded by the LoadCursor(IntPtr, String) or LoadImage(IntPtr, String, LoadImageType, Int32, Int32, LoadImageFlags) function.
If this parameter is Zero, the cursor is removed from the screen.
IntPtr
The return value is the handle to the previous cursor, if there was one.
If there was no previous cursor, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.