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
System.Runtime.InteropServicesSafeHandle
KGySoft.DrawingCursorHandle
Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 4.6.1
Syntax
public sealed class CursorHandle : SafeHandle
Public NotInheritable Class CursorHandle Inherits SafeHandle
public ref class CursorHandle sealed : public SafeHandle
[<SealedAttribute>] type CursorHandle = class inherit SafeHandle end
The CursorHandle type exposes the following members.
Methods
Name | Description | |
---|---|---|
Close | (Inherited from SafeHandle.) | |
DangerousAddRef | (Inherited from SafeHandle.) | |
DangerousGetHandle | (Inherited from SafeHandle.) | |
DangerousRelease | (Inherited from SafeHandle.) | |
Dispose | (Inherited from SafeHandle.) | |
Equals | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
SetHandleAsInvalid | (Inherited from SafeHandle.) | |
ToString | (Inherited from Object.) |
Operators
Name | Description | |
---|---|---|
(CursorHandle to IntPtr) |
Performs an implicit conversion from CursorHandle to IntPtr.
|
Properties
Name | Description | |
---|---|---|
IsClosed | (Inherited from SafeHandle.) | |
IsInvalid |
Gets whether the handle value is invalid.
(Overrides SafeHandleIsInvalid.) |
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 |
---|
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