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

SystemObject
  System.Runtime.ConstrainedExecutionCriticalFinalizerObject
    System.Runtime.InteropServicesSafeHandle
      KGySoft.DrawingCursorHandle

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.1.0
Syntax

[SecurityCriticalAttribute]
public sealed class CursorHandle : SafeHandle

The CursorHandle type exposes the following members.

Properties

  NameDescription
Public propertyIsInvalid
Gets whether the handle value is invalid.
(Overrides SafeHandleIsInvalid.)
Top
Operators

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

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

Reference