User32LoadCursor Method
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", BestFitMapping = false, ThrowOnUnmappableChar = true,
SetLastError = true)]
public static IntPtr LoadCursor(
IntPtr hInstance,
string cursorName
)
<DllImportAttribute("User32.dll", BestFitMapping := false, ThrowOnUnmappableChar := true,
SetLastError := true>]
Public Shared Function LoadCursor (
hInstance As IntPtr,
cursorName As String
) As IntPtr
Dim hInstance As IntPtr
Dim cursorName As String
Dim returnValue As IntPtr
returnValue = User32.LoadCursor(hInstance,
cursorName)
public:
[DllImportAttribute(L"User32.dll", BestFitMapping = false, ThrowOnUnmappableChar = true,
SetLastError = true)]
static IntPtr LoadCursor(
IntPtr hInstance,
String^ cursorName
)
[<DllImportAttribute("User32.dll", BestFitMapping = false, ThrowOnUnmappableChar = true,
SetLastError = true)>]
static member LoadCursor :
hInstance : IntPtr *
cursorName : string -> IntPtr
No code example is currently available or this language may not be supported.
- hInstance IntPtr
-
A handle to an instance of the module whose executable file contains the cursor to be loaded.
- cursorName String
-
The name of the cursor resource to be loaded.
Alternatively, this parameter can consist of the resource identifier in the low-order word
and zero in the high-order word.
To use one of the predefined cursors,
the application must set the hInstance parameter to Zero
and the cursorName parameter to the predefined cursor name
(eg. "IDC_ARROW", "IDC_CROSS", "IDC_HAND", "IDC_HELP", "IDC_IBEAM", "IDC_WAIT", etc).
IntPtr
If the function succeeds, the return value is the handle to the newly loaded cursor.
If the function fails, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.