CursorHandle Class

KGy SOFT Drawing Libraries Help
Represents a windows cursor. The CursorHandle instance can be passed to the System.Windows.Forms.Cursor constructor to create a new cursor.
Inheritance Hierarchy


Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 4.7.0

public sealed class CursorHandle : SafeHandle

The CursorHandle type exposes the following members.


Public propertyIsClosed
Gets a value indicating whether the handle is closed.
(Inherited from SafeHandle.)
Public propertyIsInvalid
Gets whether the handle value is invalid.
(Overrides SafeHandleIsInvalid.)

Public methodClose
Marks the handle for releasing and freeing resources.
(Inherited from SafeHandle.)
Public methodDangerousAddRef
Manually increments the reference counter on SafeHandle instances.
(Inherited from SafeHandle.)
Public methodDangerousGetHandle
Returns the value of the handle field.
(Inherited from SafeHandle.)
Public methodDangerousRelease
Manually decrements the reference counter on a SafeHandle instance.
(Inherited from SafeHandle.)
Public methodDispose
Releases all resources used by the SafeHandle class.
(Inherited from SafeHandle.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetHandleAsInvalid
Marks a handle as no longer used.
(Inherited from SafeHandle.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

Public operatorStatic member(CursorHandle to IntPtr)
Performs an implicit conversion from CursorHandle to IntPtr.

A CursorHandle instance can be created from an Icon or Bitmap instance by using the IconExtensions.ToCursorHandle and BitmapExtensions.ToCursorHandle extension methods.

This class can be used to create a custom Windows Forms System.Windows.Forms.Cursor.

Important note Important
Do keep a reference to this CursorHandle instance until the cursor is in use; otherwise, the cursor resources might be disposed too soon.

See Also