Show / Hide Table of Contents

Class MouseCursor

Helps to load cursors, etc. Contains native cursor handle.

public class MouseCursor
Remarks

To load cursors for winforms can be used System.Windows.Forms.Cursor constructors, but they don't support colors, ani cursors and custom size. Don't use this class to load cursors for WPF. Its Cursor class loads cursors correctly.


Namespace: Au.More
Assembly: Au.dll
Inheritance
object
MouseCursor

Constructors

Name Description
MouseCursor(nint)

Sets native cursor handle. The cursor will be destroyed when disposing this variable or when converting to object of other type.

Properties

Name Description
Handle

Gets native cursor handle.

Methods

Name Description
Dispose()

Destroys native cursor handle.

GetCurrentVisibleCursor(out nint)

Gets current global mouse cursor.

Hash(nint)

Calculates 64-bit FNV1 hash of cursor's mask bitmap.

Load(byte[], int)

Creates cursor from cursor file data in memory, for example from a managed resource.

Load(string, int)

Loads cursor from file.

ToGdipCursor()

Creates System.Windows.Forms.Cursor object that shares native cursor handle with this object.