IconExtensions.ToCursorHandle Method

KGy SOFT Drawing Libraries

IconExtensionsToCursorHandle Method KGy SOFT Drawing Libraries Help
Converts the provided icon to a CursorHandle, which can be passed to the System.Windows.Forms.Cursor constructor to create a new cursor.

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

public static CursorHandle ToCursorHandle(
	this Icon icon,
	Point cursorHotspot = null
)
<ExtensionAttribute>
Public Shared Function ToCursorHandle ( 
	icon As Icon,
	Optional cursorHotspot As Point = Nothing
) As CursorHandle
public:
[ExtensionAttribute]
static CursorHandle^ ToCursorHandle(
	Icon^ icon, 
	Point cursorHotspot = nullptr
)
[<ExtensionAttribute>]
static member ToCursorHandle : 
        icon : Icon * 
        ?cursorHotspot : Point 
(* Defaults:
        let _cursorHotspot = defaultArg cursorHotspot null
*)
-> CursorHandle 

Parameters

icon
Type: System.DrawingIcon
The Icon, which should be converted to a cursor.
cursorHotspot (Optional)
Type: System.DrawingPoint
The hotspot coordinates of the cursor. This parameter is optional.
Default value: 0; 0 (top-left corner)

Return Value

Type: CursorHandle
A CursorHandle instance that can be used to create a System.Windows.Forms.Cursor instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Icon. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference