Represents a windows cursor that supports colors and partial transparency. The CursorHandle instance can be passed to the
System.Windows.Forms.Cursor constructor
to create a new cursor.
See the Remarks section for details.
See the Remarks section for details.
Inheritance Hierarchy
System.Runtime.ConstrainedExecutionCriticalFinalizerObject
System.Runtime.InteropServicesSafeHandle
KGySoft.DrawingCursorHandle
Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 7.0.0-preview.2
Syntax
The CursorHandle type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() | IsInvalid |
Gets whether the handle value is invalid.
(Overrides SafeHandleIsInvalid.) |
Operators
Name | Description | |
---|---|---|
![]() ![]() | (CursorHandle to IntPtr) |
Performs an implicit conversion from CursorHandle to IntPtr.
|
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 Cursor that supports colors and partial transparency.
![]() |
---|
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