Important
Do keep a reference to this CursorHandle instance until the cursor is in use; otherwise, the cursor resources might be disposed too soon.
[SecurityCriticalAttribute]
public sealed class CursorHandle : SafeHandle
<SecurityCriticalAttribute>
Public NotInheritable Class CursorHandle
Inherits SafeHandle
[SecurityCriticalAttribute]
public ref class CursorHandle sealed : public SafeHandle
[<SealedAttribute>]
[<SecurityCriticalAttribute>]
type CursorHandle =
class
inherit SafeHandle
end
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.
IsInvalid |
Gets whether the handle value is invalid.
(Overrides SafeHandleIsInvalid) |
(CursorHandle to IntPtr) | Performs an implicit conversion from CursorHandle to IntPtr. |